1.

Which function is used to reposition the file pointer?(a) moveg()(b) seekg()(c) changep()(d) go_p()I had been asked this question in an interview.This interesting question is from File Handling topic in division Strings, Streams & Numerics in C++ of C++

Answer»

Correct CHOICE is (b) SEEKG()

Explanation: seekg() function is used to reposition a file POINTER in a file. The function takes the offset and relative position from where we NEED to SHIFT out pointer.



Discussion

No Comment Found

Related InterviewSolutions