OOPS MCQ UNIT-IV

Estudies4you
OOPS MCQ JNTUH
UNIT - IV 
I. Fill in the blanks 
1. A stream is a ________

2. ________ is the header file for stream classes. 

3. ________ function is used to shift the input pointer to given location. 

4. ________ manages the errors in data. 

5. ________ are used to manipulate the output formats. 

6. ________ sets the stream according to standard input and output of C++. 

7. ________ manipulator flusher off the buffer stream. 

8. ________ function function determines the current position of input pointer. 

9. The ________ manipulator eliminates blank spaces available before the first field. 

10. The cin object uses ________ operator to perform input operation. 


II. Multiple Choice Questions 
1. The cin and cout functions belong to ________ header file. 
(a) stdio.h 
(b) iomanip.h 
(c) iostream.h 
(d) None of the above 

2. ________ manipulator closes the output string by adding null character to it. 
(a) end 
(b) ends
(c) close 
(d) add 

3. ________ manipulator divides a new line and flush the buffer stream. 
(a) endl
(b) ends 
(c) close 
(d) add 

4. ________ is used to set the formatting flag. 
(a) ios :: precision( ) 
(b) ios :: fill( ) 
(c) ios :: width 
(d) los :: self 

5. istream class overloads ________ operator
(a) <<
(b) >>
(c) ++
(4) --

6. The constructor o following class requires a file name and mode for upending a file ________ 
(a) fstream 
(b) ofstream
(c) ifstream 
(d) All the above 

7. ________ function w d P the output pointer to given location. 
(a) tellg( )
(b) seekg( ) 
(c) seekp( ) 
(d) tellp( ) 

8. ________ stream clasS performs formatted and unformatted 1/0. operations., 
(a) istream 
(b) ostream 
(c) iostream 
(d) ios 

9. ________ is a standard error object which is used to manage the errors in buffered data. • 
(a) err 
(b) cerr
(c) clog
(d) None of the above 

10. Which of the following bit indicates irrecoverable error? 
(a) fail bit 
(b) bad bit
(c) hard fail bit 
(d) good bit

III. Match the Fallowing 

1. Stream classes

[ ]

(a) >>

2. cin 

[ ]

(b) standard error object

3. cout 

[ ]

(c) iostream.h

4. tellg( )

[ ]

(d) <<

5. cerr

[ ]

(e) ifstream class


To Top