Quiz on File Handling in C
Q.1. Which of the following true about FILE *fp
Q.2. When fopen() is not able to open a file, it returns
Q.3. In fopen(), the open mode “wx” is sometimes preferred “w” because.
1) Use of wx is more efficient. 2) If w is used, old contents of file are erased and a
new empty file is created. When wx is used, fopen()
returns NULL if file already exists.
1) Use of wx is more efficient. 2) If w is used, old contents of file are erased and a
new empty file is created. When wx is used, fopen()
returns NULL if file already exists.
Q.4. FILE reserved word is?
Q.5. What will be the output of the following snippet?
f = None
for i in range (5):
with open ("data.txt", "W") as f:
if i > 2:
break;
print (f.closed);
Q.6. The readlines() method returns:
Q.7. Which of the following is not a valid mode to open a file?
Q.8. Information stored on a storage device with a specific name is called a _____.
Q.9. Which function is used to read single line from file?
Q.10. In file handling, what does this term means "r, a"?
Q.11. getc() returns EOF when
Q.12. fseek() should be preferred over rewind() mainly because
Q.13. Which of the following statements is/are true?
Q.14. What does CSV stand for?
Q.15. Which of the following modes will refer to binary data?
Instructions:-
- This Quiz is based on File Handling in C
- Each correct answer will carry 2 points
- Once an option is selected you cannot select any other, So choose wisely
- Do not refresh the page as it will reset the quiz
- Once the time is up the quiz will automatically get submitted with no of Question responded
- Your total score alongwith your name will be shown after submission of the Quiz
- Wish you ALL THE BEST 👍👍
START
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP