Explore topic-wise MCQs in Object Oriented Programming Using C++.

This section includes 4 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming Using C++ knowledge and support exam preparation. Choose a topic below to get started.

1.

If constructors of a class are defined in private access, then __________

A. The class can t be inherited
B. The class can be inherited
C. Instance can be created only in another class
D. Instance can be created anywhere in the program
Answer» B. The class can be inherited
2.

Default constructor initializes all data members as ___________

A. All numeric member with some garbage values and string to random string
B. All numeric member with some garbage values and string to null
C. All numeric member with zero and strings to random value
D. All numeric member with zero and strings to null
Answer» E.
3.

Which type of constructor can t have a return type?

A. Default
B. Parameterized
C. Copy
D. Constructors don t have a return type
Answer» E.
4.

It s necessary to pass object by reference in copy constructor because ____________

A. Constructor is not called in pass by reference
B. Constructor is called in pass by reference only
C. It passes the address of new constructor to be created
D. It passes the address of new object to be created
Answer» B. Constructor is called in pass by reference only