Explore topic-wise MCQs in Technical MCQs.

This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.

1.

Which function is used to position back from the end of file object?

A. Seekg
B. Seekp
C. Both seekg & seekp
D. None of the above
E.
Answer» B. Seekp
2.

Calling the stream's member function sync() causes an immediate synchronization.

A. Yes
B. NO
C. May Be
D. Can't Say
Answer» B. NO
3.

By default, all the files are opened in which of the following mode?

A. Binary Mode
B. Text Mode
C. Sequential Mode
D. Both A and B
Answer» C. Sequential Mode
4.

Which is correct syntax for, position n bytes back from end of fileObject ?

A. FileObject.seekg(ios::end, n);
B. FileObject.seekg(n, ios:end );
C. FileObject.seekg(n, ios::end );
D. FileObject.seekg(ios:end, n);
Answer» D. FileObject.seekg(ios:end, n);
5.

If we have object from ofstream class, then default mode of opening the file is _____

A. ios::in
B. ios::out
C. ios::in|ios::trunc
D. ios::out|ios::trunk
Answer» E.