Question 58Asked in DSSSB TGT Computer Science (Technical), 13 Sep 2025, Shift 3 (5:00 PM)

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.
  1. Afwrite(), ftell()
  2. Bfwrite(), fseek()
  3. Cfseek(), ftell()
  4. Dfwrite(), fseek(), ftell()
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.

From DSSSB TGT Computer Science PYQ (Technical), 13 Sep 2025, Shift 3 (5:00 PM)

This is question 58 of DSSSB TGT Computer Science PYQ (Technical), 13 Sep 2025, Shift 3 (5:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.