Home / C Programming / Input / Output :: Discussion

Discussion :: Input / Output

  1. Which files will get closed through the fclose() in the following program?

    #include 
     int main() 
     {   
       FILE *fs, *ft, *fp;  
       fp = fopen("A.C", "r");
       fs = fopen("B.C", "r");  
       ft = fopen("C.C", "r");    
       fclose(fp, fs, ft);     
       return 0; 
     } 
    

  2. A.

    "A.C" "B.C" "C.C"

    B.

    "B.C" "C.C"

    C.

    "A.C"

    D.

    Error in fclose()

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    Extra parameter in call to fclose().


Be The First To Comment