File Handling MCQ

Due to ios::trunc mode, the file is truncated to zero length.

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

Streams that will be performing both input and output operations must be declared as class_________.

Answer

Correct Answer: Fstream

Note: This Question is unanswered, help us to find answer for this one

Which of the following is not used to seek a file pointer?

Answer

Correct Answer: Ios::set

Note: This Question is unanswered, help us to find answer for this one

If we have an object from ofstream class, then the default mode of opening the file is________.

Answer

Correct Answer: Ios::out|ios::trunk

Note: This Question is unanswered, help us to find answer for this one

By default, all the files are opened in ___________mode.

Answer

Correct Answer: Text

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: < fstream>

Note: This Question is unanswered, help us to find answer for this one

If we have object from fstream class, then default mode of opening the file is________

Answer

Correct Answer: Default mode depends on compiler

Note: This Question is unanswered, help us to find answer for this one

To create an output stream, we must declare the stream to be of class_____________.

Answer

Correct Answer: Ofstream

Note: This Question is unanswered, help us to find answer for this one

Which of the following is not a file opening mode.

Answer

Correct Answer: Ios::truncate

Note: This Question is unanswered, help us to find answer for this one

It is not possible to combine two or more file opening modes in the open () method.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

__________is the return type of is_open() function.

Answer

Correct Answer: Bool

Note: This Question is unanswered, help us to find answer for this one