Questions
Question 1
Streams are
a. Abstraction to perform input and output operations in sequential media
b. Abstraction to perform input and output operations in direct access media
c. Objects where a program can either insert or extract characters to and from it
d. Both a and c
Question 2
Which of the following is known as insertion operator?
a. ^
b. v
c. <<
d. >>
Question 3:
Regarding the use of new line character (/n) and endl manipulator with cout statement
a. Both ways are exactly same
b. Both are similar but endl additionally performs flushing of buffer
c. endl can’t be used with cout
d. \n can’t be used with cout
Question 4:
Which of the following is output statement in C++?
a. print
b. write
c. cout
d. cin
Question 5:
Which of the following is input statement in C++?
a. cin
b. input
c. get
d. none of above
Question 6:
By default, the standard output device for C++ programs is
a. Printer
b. Monitor
c. Modem
d. Disk
Question 7:
By default, the standard input device for C++ program is
a. Keyboard
b. Mouse
c. Scanner
d. None of these
Question 8:
Which of the following statement is true regarding cin statement?
a. cin statement must contain a variable preceded by >> operator
b. cin does not process the input until user presses RETURN key
c. you can use more than one datum input from user by using cin
d. all of above
Question 9:
Which of the following is extraction operator in C++?
a. ^
b. v
c. <<
d. >>
Question 10:
When requesting multiple datum, user must separate each by using
a. a space
b. a tab character
c. a new line character
d. all of abov
Answers
1. d. Both a and c
2. c. <<
3. b. Both are similar but endl additionally performs flushing of buffer
4. c. Cout
5. a. Cin
6. b. Monitor
7. a. Keyboard
8. d. All of above
9. d. >>
10. d. all of above
No comments:
Post a Comment