C++ MCQs with answers Page - 79

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. Procedure oriented Programs are called as

  • (A) Structured programming
  • (B) Object oriented programming
  • (C) Functional programming
  • (D) None of the above

A

Admin • 833.24K Points
Coach

Q. Automatic Initialization of object is carried out using a special member function called _________

  • (A) constructor
  • (B) reference parameter
  • (C) pointer
  • (D) friend

A

Admin • 833.24K Points
Coach

Q. In C++ a class can allow non-member functions and other classes to access its own private data, by making them as _________

  • (A) public
  • (B) friend
  • (C) protected
  • (D) private

A

Admin • 833.24K Points
Coach

Q. In c++ ___________ Operator is used for Dynamic memory allocation

  • (A) ternary
  • (B) Conditional
  • (C) Scope resolution
  • (D) new

A

Admin • 833.24K Points
Coach

Q. State True (T) or False (F).
1.Public data members can be accessed directly in the main function without an object.
2. Constructors can be overloaded.

  • (A) 1-T, 2-F
  • (B) 1-T, 2-T
  • (C) 1-F, 2-T
  • (D) 1-F, 2-F

A

Admin • 833.24K Points
Coach

Q. Where the default value of parameter have to be specified?

  • (A) Function call
  • (B) Function definition
  • (C) Function prototype
  • (D) Both B or C

A

Admin • 833.24K Points
Coach

Q. While overloading binary operators using member function, it requires___argument/s.

  • (A) Zero
  • (B) One
  • (C) Two
  • (D) Three

A

Admin • 833.24K Points
Coach

Q. For automatic objects, constructors and destructors are called each time the objects

  • (A) are destroyed
  • (B) are constructed
  • (C) inherit parent class
  • (D) enter and leave scope

A

Admin • 833.24K Points
Coach

Q. When an ADT is implemented as a C++ class, which of the following should normally be true?

  • (A) Member functions as well as member variables are public
  • (B) Member functions as well as member variables are private
  • (C) Member functions are public, member variables are private
  • (D) Member functions are private, member variables are public

A

Admin • 833.24K Points
Coach

Q. What kind of error can arise when there is a problem with memory?

  • (A) Segmentation fault
  • (B) Produce an error
  • (C) Both Segmentation fault & Produce an error
  • (D) None of the mentioned

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