C++ MCQs with answers Page - 78

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 of the following is correct about friend functions?

  • (A) Friend cannot access the members of the class directly
  • (B) Friend functions use the dot operator to access members of a class using class objects
  • (C) Friend functions can be private or public
  • (D) All of the above

A

Admin • 833.24K Points
Coach

Q. Pick the correct statement.

  • (A) Friend functions can access only protected members not the private members
  • (B) Friend functions can be invoked as a normal function
  • (C) Friend functions can be called using class objects
  • (D) Friend functions are in the scope of a class

A

Admin • 833.24K Points
Coach

Q. Where does keyword ‘friend’ should be placed?

  • (A) block function
  • (B) main function
  • (C) function definition
  • (D) function declaration

A

Admin • 833.24K Points
Coach

Q. RunTime Polymorphism in c++ is achieved by _______

  • (A) operator overloading
  • (B) function overloading
  • (C) virtual function
  • (D) friend function

A

Admin • 833.24K Points
Coach

Q. An object in C++ is ________

  • (A) collection of data-members alone
  • (B) just like a global variable
  • (C) same as a class
  • (D) a variable of class data type

A

Admin • 833.24K Points
Coach

Q. Ability of an operator or function call to take different forms is known as _______

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

A

Admin • 833.24K Points
Coach

Q. In OOPS unit of data is called as ________

  • (A) Structures
  • (B) Targets
  • (C) Blocks
  • (D) Bits

A

Admin • 833.24K Points
Coach

Q. Creating a new class using one or more existing classes is known as _______

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

A

Admin • 833.24K Points
Coach

Q. All objects have

  • (A) attributes
  • (B) a set of operations
  • (C) a unique identity
  • (D) All of the above

A

Admin • 833.24K Points
Coach

Q. When an object has many forms, it has ________

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

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