C++ MCQs with answers Page - 76

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. Classes that can be used to instantiate objects are called?

  • (A) abstract class
  • (B) concrete classes
  • (C) interface
  • (D) None of the above

A

Admin • 833.24K Points
Coach

Q. Which of the following is true?

  • (A) The C++ interfaces are implemented using abstract classes
  • (B) The purpose of an abstract class is to provide an appropriate base class from which other classes can inherit
  • (C) Abstract classes cannot be used to instantiate objects and serves only as an interface.
  • (D) All of the above

A

Admin • 833.24K Points
Coach

Q. Where does the abstract class is used?

  • (A) derived class
  • (B) base class only
  • (C) both derived & base class
  • (D) virtual class

A

Admin • 833.24K Points
Coach

Q. Which class is used to design the base class?

  • (A) erived class
  • (B) abstract class
  • (C) base class
  • (D) derived & base class

A

Admin • 833.24K Points
Coach

Q. We cannot make an instance of an abstract base class

  • (A) FALSE
  • (B) TRUE
  • (C) Can be true and false
  • (D) none of these

A

Admin • 833.24K Points
Coach

Q. Which is the correct syntax of defining a pure virtual function?

  • (A) virtual return_type func();
  • (B) virtual return_type func() = 0;
  • (C) virtual return_type func() pure;
  • (D) pure virtual return_type func();

A

Admin • 833.24K Points
Coach

Q. Which is the correct statement about pure virtual functions?

  • (A) Pure virtual function cannot implemented in derived classes
  • (B) Pure virtual function is implemented in derived classes
  • (C) Pure keyword should be used to declare a pure virtual function
  • (D) They should be defined inside a base class

A

Admin • 833.24K Points
Coach

Q. The default value of the static variable is:

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

A

Admin • 833.24K Points
Coach

Q. Reusability of code can be achieved in CPP through:

  • (A) class
  • (B) Encapsulation
  • (C) Inheritance
  • (D) Object

A

Admin • 833.24K Points
Coach

Q. C++ programming language follow______ programming approach:

  • (A) up
  • (B) Down
  • (C) Bottom-up
  • (D) Top-down

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