<< Prev Question Next Question >>

Question 10/17

Assume that we can open a file called "file1".
What happens when you try to compile and run the following program?
#include <stdio.h>
int main (void) {
FILE *f;
int i;
f = fopen("file1","wb");
fputs("545454",f);
fclose (f);
f = fopen("file1","rt");
fscanf(f,"%d ", &i);
fclose (f) ;
printf("%d",i);
return 0;
}
Choose the right answer:

LEAVE A REPLY

Your email address will not be published. Required fields are marked *