Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

C++ - QUESTIONS : PART 29

The following can be declared as friend in a class

An object

A class

A public data member

A private data member
SHOW ANSWER

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

True

 False
SHOW ANSWER

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

ios::ate 

ios::nocreate 

ios::noreplace

ios::truncate
SHOW ANSWER

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

ios::in 

 ios::out 

ios::in|ios::trunc 

 ios::out|ios::trunk
SHOW ANSWER

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

True

False
SHOW ANSWER

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

iostream 

 fstream 

 stdstream 

 Stdiostream
SHOW ANSWER

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

ofstream

 ifstream 

iostream 

None of these
SHOW ANSWER

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

< ifstream> 

 < ofstream>

 < fstream>

 Any of these
SHOW ANSWER

 By default, all the files are opened in ___________mode . 
 

 Binary

Text

Can’t say
SHOW ANSWER

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

True

False
SHOW ANSWER

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

ios::ate

ios::nocreate

ios::noreplace

ios::truncate
SHOW ANSWER

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

True

False
SHOW ANSWER

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

ios::in

 ios::out

 ios::in|ios::trunc

 ios::out|ios::trunk
SHOW ANSWER

_________ is return type of is_open() function. 

int

 bool

 float

char *
SHOW ANSWER

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

ios::in|ios::out

 ios::in|ios::out|ios::trunc

ios::in|ios::trunc

Default mode depends on compiler
SHOW ANSWER

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

ofstream

 ifstream

 iostream

None of these
SHOW ANSWER

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

iostream

fstream

stdstream

 Stdiostream
SHOW ANSWER

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

< ifstream>

< ofstream>

 < fstream>

Any of these
SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in