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

11. Which of the following is the boolean operator for logical-and?

  • &
  • &&
  • |
  • |&
Show Answer Report

12. Evaluate !(1 && !(0 || 1)).

  • TRUE
  • FALSE
Show Answer Report

13. Identify the correct statement

  • Programmer can use comments to include short explanations within the source code itself.
  • All lines beginning with two slash signs are considered comments.
  • Comments very important effect on the behaviour of the program
  • both
Show Answer Report

14. The directives for the preprocessors begin with

  • Ampersand symbol (&Wink
  • Two Slashes (//)
  • Number Sign (#)
  • Less than symbol (<Wink
Show Answer Report

15. The file iostream includes

  • The declarations of the basic standard input-output library.
  • The streams of includes and outputs of program effect.
  • Both of these
  • None of these
Show Answer Report

16. There is a unique function in C++ program by where all C++ programs start their execution

  • Start()
  • Begin()
  • Main()
  • Output()
Show Answer Report

17. Every function in C++ are followed by

  • Parameters
  • Parenthesis
  • Curly braces
  • None of these
Show Answer Report

18. Which of the following is false?

  • Cout represents the standard output stream in c++.
  • Cout is declared in the iostream standard file
  • Cout is declared within the std namespace
  • None of above
Show Answer Report

19. Every statement in C++ program should end with

  • A full stop (.)
  • A Comma (,)
  • A Semicolon (Wink
  • A colon (Smile
Show Answer Report

20. Which of the following statement is true about preprocessor directives?

  • These are lines read and processed by the preprocessor
  • They do not produce any code by themselves
  • These must be written on their own line
  • They end with a semicolon
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test