C Programming :: Input / Output
-
Point out the error in the program?
#include int main() { char ch; int i; scanf("%c", &i); scanf("%d", &ch); printf("%c %d", ch, i); return 0; } -
Point out the error in the program?
#includeint main() { FILE *fp; fp=fopen("trial", "r"); fseek(fp, "20", SEEK_SET); fclose(fp); return 0; } -
Point out the error in the program?
#include/* Assume there is a file called 'file.c' in c:\tc directory. */ int main() { FILE *fp; fp=fopen("c:\tc\file.c", "r"); if(!fp) printf("Unable to open file."); fclose(fp); return 0; } -
Point out the error/warning in the program?
#include int main() { unsigned char ch; FILE *fp; fp=fopen("trial", "r"); while((ch = getc(fp))!=EOF) printf("%c", ch); fclose(fp); return 0; }

Whatsapp
Facebook