What is the output of the following C code if there is no error in stream fp? [code] #include <stdio.h> int main() {

What is the output of the following C code if there is no error in stream fp?
Code:
    #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
 

Tìm kiếm

Back
Top