Nguyễn Cap Tuyến
New member
What is the output of the following C code if there is no error in stream fp?
A. Compilation error
B. 0
C. 1
D. Any nonzero value
Code:
#include <stdio.h>
int main()
{
FILE *fp;
fp = fopen("newfile", "w");
printf("%d\n", ferror(fp));
return 0;
}
B. 0
C. 1
D. Any nonzero value