C++ MCQs with answers Page - 97

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. Under which of the following circumstances, synchronization takes place?

  • (A) When the file is closed
  • (B) When the buffer is empty
  • (C) Explicitly, with manipulators
  • (D) Both A and C

A

Admin • 833.24K Points
Coach

Q. What is deep copy?

  • (A) A deep copy creates a copy of the dynamically allocated objects too
  • (B) A deep copy just copies the values of the data as they are
  • (C) A deep copy creates a copy of the statically allocated objects too
  • (D) Both B and C

A

Admin • 833.24K Points
Coach

Q. If the class name is X, what is the type of its “this” pointer (in a non-static, non-const member function)?

  • (A) const X* const
  • (B) X* const
  • (C) X*
  • (D) X&

A

Admin • 833.24K Points
Coach

Q. Which one of the following is not a valid reserved keyword in C++

  • (A) Explicit
  • (B) Public
  • (C) Implicit
  • (D) Private

A

Admin • 833.24K Points
Coach

Q. Which of the following relationship is known as inheritance relationship?

  • (A) ‘has-a’ relationship
  • (B) ‘is-a’ relationship
  • (C) Association relationship
  • (D) None of the above

A

Admin • 833.24K Points
Coach

Q. Vtables

  • (A) Creates a static table per class
  • (B) Creates a static table per object
  • (C) Creates a dynamic table per class
  • (D) Creates a dynamic table per object

A

Admin • 833.24K Points
Coach

Q. When class B is inherited from class A, what is the order in which the constructers of those classes are called?

  • (A) Class A first Class B next
  • (B) Class B first Class A next
  • (C) Class B’s only as it is the child class
  • (D) Class A’s only as it is the parent class

A

Admin • 833.24K Points
Coach

Q. What’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);

  • (A) The question mark should be an equal sign
  • (B) The first semicolon should be a colon
  • (C) There are too many variables in the statement
  • (D) The conditional operator is only used with apstrings

A

Admin • 833.24K Points
Coach

Q. What is shallow copy?

  • (A) A shallow copy creates a copy of the dynamically allocated objects too
  • (B) A shallow copy just copies the values of the data as they are
  • (C) A shallow copy creates a copy of the statically allocated objects too
  • (D) Both b and c above

A

Admin • 833.24K Points
Coach

Q. Which of the following is not a component of file system?

  • (A) Access method
  • (B) Auxiliary storage management
  • (C) Free integrity mechanism
  • (D) None 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