Multiple choice

Where is the file pointer fp pointing to after below mentioned statement? fseek(fp, 49, sizeof (Variable type),0);

  1. Begining of the file

  2. End of the file

  3. 49th element of the file

  4. 0th element of the file

  5. Beginning of the 50th record

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

fseek() adjust the current position in the data file pointed to by the file pointer fp so as to be an offset of 49 X sizeof (Variable type) bytes, hence pointer is at the beginning of the 50th record, which has to be modified.