File Input Output - Study Mode

[#106] What is the purpose of the 'rewind' function in C?
Correct Answer

(B) To reset the file pointer to the beginning

[#107] Which function is used to read a line of text from a file in C?
Correct Answer

(C) fgets()

[#108] What is the difference between 'r+' and 'w+' modes when opening a file in C?
Correct Answer

(B) 'r+' is for reading and writing, 'w+' is for writing only, creating a new file

[#109] Which function is used to delete a file in C?
Correct Answer

(B) remove()

[#110] What does the 'fread' function in C do?
Correct Answer

(A) Reads binary data from a file