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

1. C+++ C++

  • 1
  • 2
  • 3
  • 4
Show Answer Report

2. What is the correct value to return to the operating system upon the successful completion of a program?

  • -1
  • 1
  • 0
  • Programs do not return a value.
Show Answer Report

3. What is the only function all C++ programs must contain?

  • start()
  • system()
  • main()
  • program()
Show Answer Report

4. What punctuation is used to signal the beginning and end of code blocks?

  • { }
  • -> and <-
  • BEGIN and END
  • ( and )
Show Answer Report

5. What punctuation ends most lines of C++ code?

  • . (dot)
  • ; (semi-colon)
  • : (colon)
  • ' (single quote)
Show Answer Report

6. Which of the following is a correct comment?

  • */ Comments */
  • ** Comment **
  • /* Comment */
  • { Comment }
Show Answer Report

7. Which of the following is a correct comment?

  • */ Comments */
  • ** Comment **
  • /* Comment */
  • { Comment }
Show Answer Report

8. Which of the following is not a correct variable type?

  • float
  • real
  • int
  • double
Show Answer Report

9. Which of the following is the correct operator to compare two variables?

  • A. :=
  • B. =
  • C. equal
  • D. ==
Show Answer Report

10. Which of the following is true?

  • 1
  • 66
  • .1
  • -1
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test