Question discussion

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…

359462Medium DSSSB TGT Computer Science 0 replies 0 views
0
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.
  • Afwrite(), ftell()
  • Bfwrite(), fseek()
  • Cfseek(), ftell()
  • Dfwrite(), fseek(), ftell()
Correct answer: B

Explanation

fwrite() writes a block of data and fseek() sets the file position pointer. ftell() only returns the current position, so it does not move the pointer.

Discussion 0

Nobody has replied yet. Start the discussion!