C++ MCQ Question and Answer

C++ MCQ Question and Answer
1. C+++
C++
  • 1
  • 2
  • 3
  • 4
Show Answer
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
3. What is the only function all C++ programs must contain?
  • start()
  • system()
  • main()
  • program()
Show Answer
4. What punctuation is used to signal the beginning and end of code blocks?
  • { }
  • -> and <-
  • BEGIN and END
  • ( and )
Show Answer
5. What punctuation ends most lines of C++ code?
  • . (dot)
  • ; (semi-colon)
  • : (colon)
  • ' (single quote)
Show Answer
6. Which of the following is a correct comment?
  • */ Comments */
  • ** Comment **
  • /* Comment */
  • { Comment }
Show Answer
7. Which of the following is a correct comment?
  • */ Comments */
  • ** Comment **
  • /* Comment */
  • { Comment }
Show Answer
8. Which of the following is not a correct variable type?
  • float
  • real
  • int
  • double
Show Answer
9. Which of the following is the correct operator to compare two variables?
  • A. :=
  • B. =
  • C. equal
  • D. ==
Show Answer
10. Which of the following is true?
  • 1
  • 66
  • .1
  • -1
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test