C++ MCQs with answers Page - 50

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. Which one of the following options is correct?

  • (A) Friend function can access public data members of the class.
  • (B) Friend function can access protected data members of the class.
  • (C) Friend function can access private data members of the class.
  • (D) All of the above.

A

Admin • 833.24K Points
Coach

Q. Which of the following statements is correct in C++?

  • (A) Structure members are private by default.
  • (B) Class members are public by default.
  • (C) Structures can have functions as members.
  • (D) Classes cannot have data as protected members.

A

Admin • 833.24K Points
Coach

Q. Which of the following is used to make an abstract class?

  • (A) Making at least one member function as pure virtual function.
  • (B) Making at least one member function as virtual function.
  • (C) Declaring it abstract using virtual keyword.
  • (D) Declaring it abstract using static keyword.

A

Admin • 833.24K Points
Coach

Q. Which of the following access specifier is used as a default in a class definition?

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

A

Admin • 833.24K Points
Coach

Q. What is correct about the static data member of a class?

  • (A) A static member function can access only static data members of a class.
  • (B) A static data member is shared among all the object of the class.
  • (C) A static data member can be accessed directly from main().
  • (D) Both A and B.

A

Admin • 833.24K Points
Coach

Q. cout is a/an __________ .

  • (A) macro
  • (B) object
  • (C) function
  • (D) operator

A

Admin • 833.24K Points
Coach

Q. Which of the following concepts provides facility of using object of one class inside another class?

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

A

Admin • 833.24K Points
Coach

Q. How many types of polymorphisms are supported by C++?

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

A

Admin • 833.24K Points
Coach

Q. Which of the following is an abstract data type?

  • (A) Class
  • (B) string
  • (C) double
  • (D) int

A

Admin • 833.24K Points
Coach

Q. Which of the following keyword is used to overload an operator?

  • (A) override
  • (B) friend
  • (C) operator
  • (D) overload

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