C++ MCQ Question and Answer

C++ MCQ Question and Answer
41. Which is not a loop structure?
  • for
  • do while
  • while
  • repeat until
Show Answer
42. How many times is a do while loop guaranteed to loop?

  • 0
  • Infinitely
  • 1
  • Variable
Show Answer
43. Streams are
  • Abstraction to perform input and output operations in sequential media
  • Abstraction to perform input and output operations in direct access media
  • Objects where a program can either insert or extract characters to and from it
  • Both a and c
Show Answer
44. Which of the following is known as insertion operator?
  • ^
  • v
  • <<
  • >>
Show Answer
45. Regarding the use of  new line character (/n) and endl manipulator with cout statement

  • Both ways are exactly same
  • Both are similar but endl additionally performs flushing of buffer
  • endl can’t be used with cout
  • \n can’t be used with cout
Show Answer
46. Which of the following is output statement in C++?
  • print
  • write
  • cout
  • cin
Show Answer
47. Which of the following is input statement in C++?
  • cin
  • input
  • get
  • none of above
Show Answer
48. By default, the standard output device for C++ programs is

  • Printer
  • Monitor
  • Modem
  • Disk
Show Answer
49. By default, the standard input device for C++ program is
  • Keyboard
  • Mouse
  • Scanner
  • None of these
Show Answer
50. Which of the following statement is true regarding cin statement?
  • cin statement must contain a variable preceded by >> operator
  • cin does not process the input until user presses RETURN key
  • you can use more than one datum input from user by using cin
  • all of above
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test