C++ MCQs with answers Page - 8

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. How much bytes of memory does void occupy?

  • (A) 0
  • (B) 1
  • (C) 2
  • (D) 4

A

Admin • 833.24K Points
Coach

Q. Why are comments used?

  • (A) Make the program run faster
  • (B) To help others read & understand the program
  • (C) Increase the size of the executable program
  • (D) Make a program compile easier

A

Admin • 833.24K Points
Coach

Q. Identify the storage classes that have global visibility.

  • (A) extern
  • (B) auto
  • (C) register
  • (D) static

A

Admin • 833.24K Points
Coach

Q. Choose the option below which is not a member of class.

  • (A) Friend function
  • (B) Static function
  • (C) Virtual function
  • (D) Const function

A

Admin • 833.24K Points
Coach

Q. Total types of constructors in C++ are?

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4

A

Admin • 833.24K Points
Coach

Q. What is the number of parameters that a default constructor requires?

  • (A) 0
  • (B) 1
  • (C) 2
  • (D) 3

A

Admin • 833.24K Points
Coach

Q. What does a C++ class hold?

  • (A) Function
  • (B) Data
  • (C) Arrays
  • (D) Both a and b

A

Admin • 833.24K Points
Coach

Q. Data members and member functions of a class are private by.default. True or False?

  • (A) True
  • (B) False
  • (C) Depends on code
  • (D) None

A

Admin • 833.24K Points
Coach

Q. Under which pillar of OOPS does base class and derived class relationship come?

  • (A) Polymorphism
  • (B) Inheritance
  • (C) Encapsulation
  • (D) Abstraction

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