C++ MCQs with answers Page - 12

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. We can create objects of the abstract class.

  • (A) True
  • (B) False
  • (C) Anything
  • (D) None of the above

A

Admin • 833.24K Points
Coach

Q. Which of the followings is/are pointer-to-member declarator?

  • (A) ->*
  • (B) .*
  • (C) ::*
  • (D) both a and b

A

Admin • 833.24K Points
Coach

Q. Default value of static variable is_____ .

  • (A) 0
  • (B) 1
  • (C) Garbage value
  • (D) Compiler dependent

A

Admin • 833.24K Points
Coach

Q. ________ are used to format the data display in CPP.

  • (A) Iterators
  • (B) Punctuators
  • (C) Manipulators
  • (D) Allocators

A

Admin • 833.24K Points
Coach

Q. Reusability of the code can be achieved in CPP through _____

  • (A) Polymorphism
  • (B) Encapsulation
  • (C) Inheritance
  • (D) Both a and c

A

Admin • 833.24K Points
Coach

Q. By default, members of the class are ____________ in nature.

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

A

Admin • 833.24K Points
Coach

Q. Abstract class is __

  • (A) A class must contain all pure virtual functions
  • (B) A class must contain at least one pure virtual function
  • (C) A class may not contain pure virtual function.
  • (D) A class must contain pure virtual function defined outside the class.

A

Admin • 833.24K Points
Coach

Q. By default the members of the structure are

  • (A) private
  • (B) protected
  • (C) public
  • (D) Access specifiers not applicable for structures.

A

Admin • 833.24K Points
Coach

Q. A protected member of the class in accessible in

Code:
A protected member of the class in accessible in
  • (A) Only same class
  • (B) Same class and derived class
  • (C) Outside the class
  • (D) None of the above.

A

Admin • 833.24K Points
Coach

Q. Class function which is called automatically as soon as the object is created is called as __

  • (A) Constructor
  • (B) Destructor
  • (C) Friend function
  • (D) Inline function.

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