Question
Download Solution PDFMatch 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. |
Choose the correct answer from the options given below:
Answer (Detailed Solution Below)
Option 2 : A - III, B - I, C - IV, D - II
Detailed Solution
Download Solution PDF
LIST - I (FUNCTIONS) | LIST - II (Uses of functions) |
---|---|
A. fseek () | III. Sets the position to a desired point in the file |
B. ftell () | I. Gives the current position in the file |
C. feof () | IV. Used to test for an end of file condition |
D. rewind () | II. Sets the position to the beginning of the file |
The correct answer is option 2: A - III, B - I, C - IV, D - II
Explanation:
- fseek (): This function sets the file position indicator to a specific point in the file. Hence, it matches with III.
- ftell (): This function returns the current file position indicator's value in the file. Hence, it matches with I.
- feof (): This function checks if the end of the file has been reached. Hence, it matches with IV.
- rewind (): This function sets the file position indicator to the beginning of the file. Hence, it matches with II.
The correct answer is : option 2