Programming MCQS - QUESTION DETAILS

How do you close a file in C?
A. close(file);
B. fclose(file);
C. file.close();
D. endfile(file);

'fclose' is used to close a file in C.

Similar Questions

Which header file is needed for file input and output operations in C?






What is the output of printf("%d", 5 << 2);?






Which method is used to read data from the keyboard in Java?






What is the purpose of the 'strtok' function in C?






What is the output of System.out.println(10 / 3.0);?






What is the output of System.out.println("Java" == "Java");?






What is the output of printf("%d", sizeof(1.5));?






How do you define a macro in C?






Which method is called to compare objects for equality in Java?






What is the purpose of the 'finalize' method in Java?