C++ MCQs with answers Page - 59

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. In C++ Program, inline fuctions are expanded during ____

  • (A) Compile Time
  • (B) Debug Time
  • (C) Coding Time
  • (D) Run Time

A

Admin • 833.24K Points
Coach

Q. To perfor file input / output operation in C++, we must include which header file ?

  • (A) <fiostream>
  • (B) <ofstream>
  • (C) <fstream>
  • (D) <ifstream>

A

Admin • 833.24K Points
Coach

Q. An exceptio in C++ can be generated using which keywords.

  • (A) Throws
  • (B) Throw
  • (C) Thrown
  • (D) Threw

A

Admin • 833.24K Points
Coach

Q. Which class allows only one object to be created.

  • (A) Numero Uno Class
  • (B) Sigleton Class
  • (C) Abstruct Class
  • (D) Nuclear Family Class

A

Admin • 833.24K Points
Coach

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

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

A

Admin • 833.24K Points
Coach

Q. Which classes allow primitive types to be accessed as objects?

  • (A) Storage
  • (B) Wrapper
  • (C) Virtual
  • (D) Friend

A

Admin • 833.24K Points
Coach

Q. When is std::bad_alloc exception thrown?

  • (A) When delete operator cannot delete the allocated (corrupted) object
  • (B) When type requested for new operation is considered bad, thisexception is thrown
  • (C) When alloc function fails
  • (D) When new operator cannot allocate memory

A

Admin • 833.24K Points
Coach

Q. Which one of the following is not a fundamental data type in C++

  • (A) int
  • (B) wchar_t
  • (C) float
  • (D) string

A

Admin • 833.24K Points
Coach

Q. Which of the following is a valid destructor of the class name “Country”

  • (A) int ~Country()
  • (B) void Country()
  • (C) int ~Country(Country obj)
  • (D) void ~Country()

A

Admin • 833.24K Points
Coach

Q. Which of the following correctly describes C++ language?

  • (A) Dynamically typed language
  • (B) Type-less language
  • (C) Statically typed language
  • (D) None of these

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