Page 1 of 1

What is the output of the following C code if there is no error in stream fp?

Posted: Wed Jul 13, 2022 7:54 pm
by answerhappygod
#include <stdio.h> int main() { FILE *fp; fp = fopen("newfile", "w"); printf("%d\n", ferror(fp)); return 0; }
a) Compilation error
b) 0
c) 1
d) Any nonzero value