C++ MCQ Questions and Answers

Practice Mode
Showing 10 of 93 questions
Q41
Which is not a loop structure?
  • A for
  • B do while
  • C while
  • D repeat until
Answer: Option D
Q42
How many times is a do while loop guaranteed to loop?
  • A 0
  • B Infinitely
  • C 1
  • D Variable
Answer: Option C
Q43
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
Answer: Option D
Q44
Which of the following is known as insertion operator?
  • A ^
  • B v
  • C <<
  • D >>
Answer: Option C
Q45
Regarding the use of&nbsp; 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
Answer: Option B
Q46
Which of the following is output statement in C++?
  • A print
  • B write
  • C cout
  • D cin
Answer: Option C
Q47
Which of the following is input statement in C++?
  • A cin
  • B input
  • C get
  • D none of above
Answer: Option A
Q48
By default, the standard output device for C++ programs is
  • A Printer
  • B Monitor
  • C Modem
  • D Disk
Answer: Option B
Q49
By default, the standard input device for C++ program is
  • A Keyboard
  • B Mouse
  • C Scanner
  • D None of these
Answer: Option A
Q50
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
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test