In C programming, which file-handling function is used to reposition the file…

2025

In C programming, which file-handling function is used to reposition the file pointer?

  1. A.

    fread()

  2. B.

    fwrite()

  3. C.

    fprintf()

  4. D.

    fclose()

  5. E.

    fseek()

Attempted by 6 students.

Show answer & explanation

Correct answer: E

Correct answer: fseek().

The fseek() function moves the file position indicator to a specified location relative to the beginning, current position, or end of the file. It is used before reading or writing from a changed file position.

Explore the full course: Ibps So It Mains

Loading lesson…