Vidyalelo
C Programming · Q100

File Input Output

Programming · C Programming · question 100

Q100

What is the output of the following C code if there is no error in stream fp? #include int main() FILE *fp; fp = fopen("newfile", "w"); printf("%d ", ferror(fp)); return 0;

A.
Compilation error
B.
0
Answer
C.
1
D.
Any nonzero value

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board