C++ MCQs with answers Page - 112

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 operator is required to be overloaded as member function only?

  • (A) _
  • (B) _ _
  • (C) ++ (postfix version)
  • (D) =

A

Admin • 833.24K Points
Coach

Q. Which type of data file is analogous to an audio cassette tape?

  • (A) Random access file
  • (B) Sequential access file
  • (C) Binary file
  • (D) Source code file

A

Admin • 833.24K Points
Coach

Q. What is the built in library function to compare two strings?

  • (A) string_cmp()
  • (B) strcmp()
  • (C) equals()
  • (D) str_compare()

A

Admin • 833.24K Points
Coach

Q. Which of the following are member dereferencing operators in CPP? 1. * 2. :: 3. ->* 4. ::* 5. ->

  • (A) Only 1, 3, 4
  • (B) Only 1 and 5
  • (C) Only 3 and 4
  • (D) Only 3,4,5

A

Admin • 833.24K Points
Coach

Q. Which of the followings is/are pointer-to-member declarator?

  • (A) ->*
  • (B) .*
  • (C) ::*
  • (D) both A and B

A

Admin • 833.24K Points
Coach

Q. Assigning one or more function body to the same name is called ____________.

  • (A) Function Overriding
  • (B) Function Overloading
  • (C) Both A and B
  • (D) None of the above

A

Admin • 833.24K Points
Coach

Q. Return type of uncaught_exception () is ________________.

  • (A) int
  • (B) bool
  • (C) char *
  • (D) double

A

Admin • 833.24K Points
Coach

Q. If inner catch handler is not able to handle the exception then__________.

  • (A) Compiler will look for outer try handler
  • (B) Program terminates abnormally
  • (C) Compiler will check for appropriate catch handler of outer try block
  • (D) None

A

Admin • 833.24K Points
Coach

Q. Attempting to throw an exception that is not supported by a function call results in calling _____________ library function.

  • (A) indeterminate ()
  • (B) unutilized()
  • (C) unexpected()
  • (D) unpredicted()

A

Admin • 833.24K Points
Coach

Q. The code of statements which may cause abnormal termination of the program should be written under_________ block.

  • (A) Try
  • (B) catch
  • (C) Finally
  • (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