Navigation Menu
Home Blog Latest Notices
100% Free

ECAT - Practice Test - Computer Science - File Handling in C - Quiz 3

Practice 10 high yield MCQs on Computer Science from Chapter File Handling in C for Practice Test. After submission, get instant results with correct answers and detailed explanations. This is Quiz 3 of the series.

21. The fwrite() function is used for:



22. What is the purpose of the EOF constant?



23. Which function removes a file?



24. Which function renames a file?



25. When reading a file, fgetc() returns EOF when:



26. What is the output: int c; while ((c = fgetc(fp)) != EOF) { putchar(c); }



27. Which function is used to check if a file exists (open for reading)?



28. When you open a file in "w" mode, what happens if the file already exists?



29. What does fflush() do?



30. Which of these is a valid way to open a file for text reading?



← Back to Quiz Sets
Instructions: Select one answer per question. After submitting, you will see your score, correct answers, and explanations.

Medical Colleges in Pakistan

Explore medical institutions city‑wise – public & private.

Browse All Medical Colleges →