--:--









Quiz for File operations fopen

Course: C Language | Subject: Unit 8 | Topic: File Handling



Logo

Q1: What does the fopen() function do?

Logo

Q2: What does fopen("file.txt", "r") do?

Logo

Q3: What happens if fopen() fails to open a file?

Logo

Q4: Which mode opens a file for appending data?

Logo

Q5: How to open a binary file for reading using fopen?

Logo

Q6: What is the return type of fopen()?

Logo

Q7: Which of these is NOT a valid fopen mode?

Logo

Q8: How do you check if fopen() was successful?

Logo

Q9: What happens if fopen() is called with mode "w" on an existing file?

Logo

Q10: Which header file is needed for fopen()?

Logo

Q11: Can fopen() open files on network drives?

Logo

Q12: What does mode "r+" signify in fopen()?

Logo

Q13: Which mode creates a new file or truncates existing file?

Logo

Q14: What happens if fopen() is used with a non-existing file in "r" mode?

Logo

Q15: Can fopen() be used to open directories?

Logo

Q16: What is the effect of using "a+" mode in fopen()?

Logo

Q17: Is it necessary to close a file opened with fopen()?

Logo

Q18: Which function is used to close a file opened with fopen()?

Logo

Q19: Can fopen() open files with relative paths?

Logo

Q20: What does the mode "wb" do in fopen()?

Logo

Q21: What does the fopen() function do?

Logo

Q22: What does fopen("file.txt", "r") do?

Logo

Q23: What happens if fopen() fails to open a file?

Logo

Q24: Which mode opens a file for appending data?

Logo

Q25: How to open a binary file for reading using fopen?

Logo

Q26: What is the return type of fopen()?

Logo

Q27: Which of these is NOT a valid fopen mode?

Logo

Q28: How do you check if fopen() was successful?

Logo

Q29: What happens if fopen() is called with mode "w" on an existing file?

Logo

Q30: Which header file is needed for fopen()?

Logo

Q31: Can fopen() open files on network drives?

Logo

Q32: What does mode "r+" signify in fopen()?

Logo

Q33: Which mode creates a new file or truncates existing file?

Logo

Q34: What happens if fopen() is used with a non-existing file in "r" mode?

Logo

Q35: Can fopen() be used to open directories?

Logo

Q36: What is the effect of using "a+" mode in fopen()?

Logo

Q37: Is it necessary to close a file opened with fopen()?

Logo

Q38: Which function is used to close a file opened with fopen()?

Logo

Q39: Can fopen() open files with relative paths?

Logo

Q40: What does the mode "wb" do in fopen()?

Are you ready to start test? Set your time limit