1.  ios::trunc is used for ?


1. If the file is opened for output operations and it already existed, no action is taken.
2. If the file is opened for output operations and it already existed, its previous content is deleted and replaced by the new one.
3. If the file is opened for output operations and it already existed, then a new copy is created.
None of the above


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

2.  To perform File I/O operations, we must use _____________ header file.





Any of these


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

3.  How to get position to the nth byte of fileObject ?


fileObject.seekg( 'filename',n );
fileObject.seekg( 'filename',n );
fileObject.seekg( n );
fileObject.seekg( n, ios::app );


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

4.  How to get position n bytes forward in fileObject ?


fileObject.seekg( ios::cur, n );
fileObject.seekg( n, ios:cur );
fileObject.seekg( n, ios::cur );
fileObject.seekg( ios:cur, n );


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

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


fileObject.seekg( ios::end, n );
fileObject.seekg( n, ios:end );
fileObject.seekg( n, ios::end );
fileObject.seekg( ios:end, n );


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report