C++ MCQs with answers Page - 81

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. String class have a concat() function that is used to

  • (A) Remove a string from end of one string
  • (B) Append one string at end of another string
  • (C) Add two strings
  • (D) Replace old string by new string

A

Admin • 833.24K Points
Coach

Q. Which among the following is/are type(s) of this pointer?

  • (A) int
  • (B) volatile
  • (C) const
  • (D) const or volatile

A

Admin • 833.24K Points
Coach

Q. Which is the pointer which denotes the object calling the member function?

  • (A) Zero pointer
  • (B) Null pointer
  • (C) This pointer
  • (D) Variable pointer

A

Admin • 833.24K Points
Coach

Q. Which property is shown most when upcasting is used?

  • (A) Encapsulation
  • (B) Complex code simple syntax
  • (C) Code efficiency
  • (D) Code reusability

A

Admin • 833.24K Points
Coach

Q. If multiple inheritance is implemented, which upcasting will be correct?

  • (A) Upcast is not possible
  • (B) Upcast to send base class listed in inheritance
  • (C) Upcast to any base class
  • (D) Upcast to first base class listed in inheritance

A

Admin • 833.24K Points
Coach

Q. When are the pointer types known for upcasting the objects?

  • (A) Compile time
  • (B) Runtime
  • (C) Source code build time
  • (D) Doesn’t apply to pointer types

A

Admin • 833.24K Points
Coach

Q. Which container provides random access iterators?

  • (A) sort
  • (B) vector
  • (C) deque
  • (D) both vector & deque

A

Admin • 833.24K Points
Coach

Q. Which among the following is a mandatory condition for downcasting?

  • (A) It can’t be done explicitly
  • (B) It must be done explicitly
  • (C) It must be done implicitly
  • (D) It must not be done explicitly

A

Admin • 833.24K Points
Coach

Q. Which of the following is not a member of class?

  • (A) Virtual function
  • (B) Const function
  • (C) Friend function
  • (D) Static function

A

Admin • 833.24K Points
Coach

Q. How can we restrict dynamic allocation of objects of a class using new?

  • (A) By overloading new operator and new[] operators
  • (B) By making an empty private new and new[] operators
  • (C) By making an empty private new operator.
  • (D) By overloading new operator

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