Match the LIST-I with LIST-II LIST-I (Functions) LIST-II (Uses of functions)…

2025

Match the LIST-I with LIST-II
 

LIST-I (Functions)

LIST-II (Uses of functions)

A. fseek()

I. Gives the current position in the file

B. ftell()

II. Sets the position to the beginning of the file

C. feof()

III. Sets the position to a desired point in the file

D. rewind()

IV. Used to test for an end of file condition

  1. A.

    A-II, B-III, C-I, D-IV

  2. B.

    A-III, B-I, C-IV, D-II

  3. C.

    A-III, B-I, C-II, D-IV

  4. D.

    A-II, B-IV, C-III, D-I

Attempted by 374 students.

Show answer & explanation

Correct answer: B

Correct matching:

  • fseek() — Sets the file position to a desired point (useful to move forward or backward from a specified origin).

  • ftell() — Returns the current position (offset) in the file.

  • feof() — Tests whether the end-of-file indicator for the stream is set (used to detect EOF).

  • rewind() — Sets the file position to the beginning of the file (equivalent to fseek(stream, 0, SEEK_SET)).

Summary: fseek() -> sets to a desired point; ftell() -> gives current position; feof() -> tests end-of-file; rewind() -> sets to beginning.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor