C++ MCQ Questions and Answers
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
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
14. The directives for the preprocessors begin with
- Ampersand symbol (&Wink
- Two Slashes (//)
- Number Sign (#)
- Less than symbol (<Wink
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
16. There is a unique function in C++ program by where all C++ programs start their execution
- Start()
- Begin()
- Main()
- Output()
17. Every function in C++ are followed by
- Parameters
- Parenthesis
- Curly braces
- None of these
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
19. Every statement in C++ program should end with
- A full stop (.)
- A Comma (,)
- A Semicolon (Wink
- A colon (Smile
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