Contents

What is the correct syntax for open () function in file handling?
a) myfile. open(file);               
b) myfile. open[file];
c) myfile. open{file};

d) none of these

a

Which of the following statement is used to declare variable?
a) ifStream file;  
b) ifStream file();
c) ifStream file[];
d) ifStream file {}.

a

Which of the following mode flag is used for input/reading operation?
a) ios:: out                   
b) ios:: in
c) ios:: binary              
d) ios:: ate

b

Which of the following mode flag is used for output/writing operation?
a) ios:: out                  
b) ios:: in
c) ios:: binary              
d) ios:: ate

a

Which of the following mode flag is used for open in binary operation?
a) ios:: out                   
b) ios:: in
c) ios:: binary 
d) ios:: ate

c

Which of the following mode flag set initial position at end of file?
a) ios:: out                   
b) ios:: in
c) ios:: binary              
d) ios:: ate

d