Computer File Handling in “C” Test Online

Important Computer File Handling in “C” Question and Answer

Total Questions: 50
Time Allowed: 25 Minutes
Total Marks: 50
How to Attempt Test: Please choose the right Option in MCQ-type question.
Test Helpful For: ECAT Entry Test
Computer Online Test
Interview Questions about Computer
All Universities Entrance Test
Recruitments Tests

File Handling in “C” Practice Test Online With Explanation

 0%

Page 1 of 2

Uncategorized

1. Which function returns the next character from a file?

2. What will fopen() return if it fails to open a file?

3. Which function is used to write a string to a file?

4. Which of the following is correct for writing formatted data to a file?

5. Which mode is used to append data to a file?

6. Which standard library function is used to rename a file?

7. Which of the following is a correct way to create and write to a binary file?

8. Which function is used to detect file errors?

9. Which function is used to read a block of data from a file?

10. Which function is used to open a file in C?

11. What does "w" mode do in fopen()?

12. Which header file is required for file operations in C?

13. What is the return value of fclose() on success?

14. Which of the following is used to read a character from a file?

15. Which of the following is used to read a string from a file?

16. Which of the following modes allows both reading and writing?

17. What happens when fclose() is not called?

18. Which function moves the file pointer back to the beginning of a file?

19. What happens if fopen() is called with "r" mode on a non-existent file?

20. What does ferror() return if no error occurs?

21. Can a file be opened for both reading and writing?

22. What will fread() return if it fails?

23. Which of the following statements is true about file handling in C?

24. Which of the following can be used to store structured data in files?

25. Which of the following is used to write binary data to a file?


 

Mustansar Khan

Hey Exam Warriors! I'm Mustansar Khan, your ally in conquering tests. Uncover strategies, real-time experiences, and expert advice to turn your study sessions into victories. Let's gear up for success!

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button