Contents

Which of the following is correct structure for open a file in write mode?
a) outfile. Open (“file.dot”, ios::out| ios::trunc);         
b) afile. open (“file.dot”, ios::out|ios::in);
c) file. open (“test.bin”, ios::out|ios :: app);
d) all of these

a

Which of the following is correct structure for open a file for reading and writing purpose?
a) outfile. open (“file.dot”, ios::out| ios::trunc);  
b) afile. open (“file.dot”, ios::out|ios:: in);
c) file. open (“test.bin”, ios::out|ios:: app);
d) all of these

b

Which of the following is correct structure for adding new data in file?
a) outfile. open (“file.dot”, ios::out| ios::trunc);              
b) afile. open (“file.dot”, ios::out|ios:: in);
c) file. open (“test.bin”, ios::out|ios:: app);
d) all of these

c

Which of the following operator is used in reading files?
a) insertion <<             
b) extraction >>
c) ampersand &&        
d) none of these

b

What is the correct format for reading file using object?
a) myFile >>c;
b) myFile <<c;
c) myFile $$c;             
d) myFile &&c;

a

Which of the following function is used to terminate automatically stream files?
a) new ()                                  
b) open ()
c) save ()                                 
d) close ()

d