C++ MCQs with answers Page - 52

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. In which of the following a virtual call is resolved at the time of compilation?

  • (A) From inside the main().
  • (B) From inside the destructor.
  • (C) From inside the constructor.
  • (D) Both B and C.

A

Admin • 833.24K Points
Coach

Q. Which of the following statements regarding inline functions is correct?

  • (A) It speeds up execution.
  • (B) It increases the code size.
  • (C) It slows down execution.
  • (D) Both A and B.

A

Admin • 833.24K Points
Coach

Q. Which one of the following is the correct way to declare a pure virtual function?

  • (A) void Display(void) = 0;
  • (B) virtual void Display(void) = 0;
  • (C) virtual void Display = 0;
  • (D) virtual void Display(void){0};

A

Admin • 833.24K Points
Coach

Q. Which of the following header file includes definition of cin and cout?

  • (A) iostream.h
  • (B) iomanip.h
  • (C) ostream.h
  • (D) istream.h

A

Admin • 833.24K Points
Coach

Q. Which of the following is correct about class and structure?

  • (A) class data members are private by default while that of structure are public by default.
  • (B) Pointer to structure or classes cannot be declared.
  • (C) class data members are public by default while that of structure are private.
  • (D) class can have member functions while structure cannot.

A

Admin • 833.24K Points
Coach

Q. Which of the following concepts means wrapping up of data and functions together?

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

A

Admin • 833.24K Points
Coach

Q. Which of the following concepts means waiting until runtime to determine which function to call?

  • (A) Dynamic loading
  • (B) Dynamic binding
  • (C) Dynamic casting
  • (D) Data hiding

A

Admin • 833.24K Points
Coach

Q. How "Late binding" is implemented in C++?

  • (A) Using polymorphic tables
  • (B) Using Indexed virtual tables
  • (C) Using Virtual tables
  • (D) Using C++ tables

A

Admin • 833.24K Points
Coach

Q. Which of the following operator is overloaded for object cout?

  • (A) =
  • (B) +
  • (C) <<
  • (D) >>

A

Admin • 833.24K Points
Coach

Q. Which of the following is a mechanism of static polymorphism?

  • (A) Templates
  • (B) Operator overloading
  • (C) Function overloading
  • (D) All of the above

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