Which of the following library file functions in C program is/are correct?
Which of the following library file functions in C program is/are correct?
fwrite()- This function is used for writing an entire block to a given file.
fseek()- This function is used for setting the file position pointer at the specified byte.
ftell()- This function is used to move the file position pointer to the beginning of the file.
Show answerHide answer
Correct answer: (B) fwrite(), fseek()
Explanation
fwrite() writes a block of data, and fseek() sets the file position pointer. ftell() only returns the current position; rewind() is the function that moves to the beginning.