Test: File Handeling - 1


15 Questions MCQ Test Learn to Program with C++: Beginner to Expert | Test: File Handeling - 1


Description
This mock test of Test: File Handeling - 1 for Back-End Programming helps you for every Back-End Programming entrance exam. This contains 15 Multiple Choice Questions for Back-End Programming Test: File Handeling - 1 (mcq) to study with solutions a complete question bank. The solved questions answers in this Test: File Handeling - 1 quiz give you a good mix of easy questions and tough questions. Back-End Programming students definitely take this Test: File Handeling - 1 exercise for a better result in the exam. You can find other Test: File Handeling - 1 extra questions, long questions & short questions for Back-End Programming on EduRev as well by searching above.
QUESTION: 1

By default, all the files are opened in ___________mode .

Solution:
QUESTION: 2

Which stream class is to only read from files ?

Solution:
QUESTION: 3

Which of the following is not a file opening mode ____ .

Solution:
QUESTION: 4

Which among following is used to open a file in binary mode ?

Solution:

ios:app → All output operations are performed at the end of the file, appending the content to the current content of the file.
ios::out → Open for output operations.
ios::in → Open for input operations.

QUESTION: 5

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

Solution:
QUESTION: 6

Which is correct syntax ?

Solution:
QUESTION: 7

If we have object from fstream class, then what is the default mode of opening the file?

Solution:
QUESTION: 8

Which stream class is to only write on files ?

Solution:
QUESTION: 9

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

Solution:
QUESTION: 10

Which among following is correct syntax of closing a file in c++ ?

Solution:
QUESTION: 11

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

Solution:
QUESTION: 12

Which stream class is used to both read and write on files ?

Solution:
QUESTION: 13

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

Solution:
QUESTION: 14

ios::trunc is used for ?

Solution:
QUESTION: 15

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

Solution:

Related tests