C++ MCQs with answers Page - 74

Here, you will find a collection of MCQ questions on C++. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. The following program segment in C++

Code:
const int m =10;
int &n = m;
n=11;
count << m << n;
  • (A) Compile time error
  • (B) run time error
  • (C) prints 1111
  • (D) print 1011

A

Admin • 833.24K Points
Coach

Q. Following declaration in C++

Code:
int x ; int &p = x;
is same as the declaration
int x, *p; p =&x;
  • (A) true
  • (B) false
  • (C) sometimes true
  • (D) none of these

A

Admin • 833.24K Points
Coach

Q. In C++ , following statement -
Class z : public X , public Y is an example of

  • (A) multiple inheritance
  • (B) Multilevel Inheritance
  • (C) linear Inheritance
  • (D) none of these

A

Admin • 833.24K Points
Coach

Q. For a method to be an interface between the outside world and a class , it has to be declared

  • (A) private
  • (B) public
  • (C) external
  • (D) protected

A

Admin • 833.24K Points
Coach

Q. First edition of the C++ programming language was released in:

  • (A) 1950
  • (B) 1980
  • (C) 1985
  • (D) 1990

A

Admin • 833.24K Points
Coach

Q. The c++ contains header file which is:

  • (A) conio.h
  • (B) iostream.h
  • (C) iostream
  • (D) stdio.h

A

Admin • 833.24K Points
Coach

Q. Which one is the correct identifier in c++

  • (A) #VAR!
  • (B) @123VAr
  • (C) VAR_12
  • (D) VaR123Q

A

Admin • 833.24K Points
Coach

Q. Classes which is used in CPP are:

  • (A) Function
  • (B) Data types
  • (C) User define Function
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. C++ programming used comment which is:

  • (A) /* */ multiline
  • (B) // single line
  • (C) Both A & B
  • (D) Only A

A

Admin • 833.24K Points
Coach

Q. Default access specifier for c++ class is:

  • (A) protected
  • (B) private
  • (C) default
  • (D) public

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ