C++ MCQ Questions and Answers

Take Exam

C++ MCQ questions and answers are vital for students preparing for software development and IT placement exams like TCS, Infosys, and Tech Mahindra. These questions test your understanding of core concepts such as classes, objects, inheritance, polymorphism, and templates. Practicing C++ programming MCQs with detailed explanations helps strengthen coding logic and syntax understanding. This topic is ideal for candidates aiming to improve their performance in programming interview questions with answers and campus recruitment tests.

C++ MCQ

Showing 10 of 93 questions

41. Which is not a loop structure?

  • for
  • do while
  • while
  • repeat until
Show Answer Report

42. How many times is a do while loop guaranteed to loop?

  • 0
  • Infinitely
  • 1
  • Variable
Show Answer Report

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 Report

44. Which of the following is known as insertion operator?

  • ^
  • v
  • <<
  • >>
Show Answer Report

45. Regarding the use of&nbsp; 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 Report

46. Which of the following is output statement in C++?

  • print
  • write
  • cout
  • cin
Show Answer Report

47. Which of the following is input statement in C++?

  • cin
  • input
  • get
  • none of above
Show Answer Report

48. By default, the standard output device for C++ programs is

  • Printer
  • Monitor
  • Modem
  • Disk
Show Answer Report

49. By default, the standard input device for C++ program is

  • Keyboard
  • Mouse
  • Scanner
  • None of these
Show Answer Report

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 Report
Questions and Answers for Competitive Exams Various Entrance Test