C++ MCQs with answers Page - 65

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. Vtables

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

A

Admin • 833.24K Points
Coach

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

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

A

Admin • 833.24K Points
Coach

Q. Which of the following is the most general exception handler that catches exception of any type?

  • (A) catch()
  • (B) catch(std::exception)
  • (C) catch(std::any_exception)
  • (D) catch(…)

A

Admin • 833.24K Points
Coach

Q. Which of the following is the most general exception handler that catches exception of ‘any type’?

  • (A) catch(std::exception)
  • (B) catch(std::any_exception)
  • (C) catch()
  • (D) catch(…)

A

Admin • 833.24K Points
Coach

Q. In a group of nested loops, which loop is executed the most number of times?

  • (A) cannot be determined without knowing the size of the loops
  • (B) all loops are executed the same number of times
  • (C) the innermost loop
  • (D) the outermost loop

A

Admin • 833.24K Points
Coach

Q. What is the Difference between struct and class in terms of Access Modifier?

  • (A) By default all the struct members are public while by default class members are protected.
  • (B) By default all the struct members are public while by default class members are private.
  • (C) By default all the struct members are protected while by default class members are private.
  • (D) By default all the struct members are private while by default class members are public.

A

Admin • 833.24K Points
Coach

Q. Inline functions are invoked at the time of

  • (A) Run time
  • (B) Compile time
  • (C) Depends on how it is invoked
  • (D) Both A and B

A

Admin • 833.24K Points
Coach

Q. Which of the following below is /are a valid iterator type?

  • (A) Input Iterator
  • (B) Backward Iterator
  • (C) Forward Iterator
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. What defines a general set of operations that will be applied to various types of data?

  • (A) Template class
  • (B) Class template
  • (C) Function template
  • (D) Both A and B

A

Admin • 833.24K Points
Coach

Q. Under which of the following circumstances, synchronisation takes place?

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

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