C++ MCQs with answers Page - 167

Dear candidates you will find MCQ questions of C++ here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question

A

Admin • 37.26K Points
Coach

Q. Which of the following statements about constructors in C++ is false?

  • (A) A constructor has the same name as the class.
  • (B) A constructor does not have a return type.
  • (C) A constructor can be private.
  • (D) A constructor must be explicitly called when creating an object.

V

Vijay Sangwan • 28.62K Points
Instructor II

Q. Which keyword is used to declare a constant variable in C++?

  • (A) define
  • (B) const
  • (C) static
  • (D) constant

R

Rakesh Kumar • 28.44K Points
Instructor II

Q. What is the default access specifier for class members in C++?

  • (A) public
  • (B) private
  • (C) protected
  • (D) None of the above

G

Gopal Sharma • 38.32K Points
Coach

Q. Which function is used to release dynamically allocated memory in C++?

  • (A) free()
  • (B) delete
  • (C) release()
  • (D) dispose()

P

Praveen Singh • 36.81K Points
Coach

Q. Which operator is used to resolve ambiguity in multiple inheritance?

  • (A) ::
  • (B) ->
  • (C) .*
  • (D) None of the above

R

Ram Sharma • 193.88K Points
Coach

Q. Which of the following is an example of function overloading in C++?

  • (A) Using multiple functions with the same name but different parameters
  • (B) Using a function with the same name in a derived class
  • (C) Using a function inside a loop
  • (D) Defining a function inside a structure

Be the first to start discuss.

Download our easy to use, user friendly Android App from Play Store. And learn MCQs with one click.

Image

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.