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
42. How many times is a do while loop guaranteed to loop?
- 0
- Infinitely
- 1
- Variable
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
45. Regarding the use of 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
47. Which of the following is input statement in C++?
- cin
- input
- get
- none of above
48. By default, the standard output device for C++ programs is
- Printer
- Monitor
- Modem
- Disk
49. By default, the standard input device for C++ program is
- Keyboard
- Mouse
- Scanner
- None of these
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