Tricky OOPs MCQs to Master in 2024

12

A. True  B. False  C. Depends on the code.  D. None

1. Data members and member functions of a class are private by default. True or false?

Check out the answer here!

A. Constructor  B. Destructor  C. Static  D. None

2. Which of the following functions can be inherited from the base class?

Check out the answer here!

3. Identify the operators that cannot be overloaded.

Check out the answer here!

A. ?:  B. .(dot operator)  C. >>  D. Both A and B

4. On what basis is it determined when a variable comes into existence in memory?

A. Data type  B. Storage class  C. Scope  D. All of the above

Check out the answer here!

5. Choose the option below which can show polymorphism.

A. Overloading ||  B. Overloading <<  C. Overloading &&  D. Overloading +=

Check out the answer here!

A. Compile-time  B. Runtime inheritance  C. Multiple inheritances  D. Language independent

6. What type of inheritance does single-level inheritance support?

Check out the answer here!

A. ()class_name  B. -class_name  C. class_name()  D. ~class_name()

7. Select the following which shows the correct constructor.

Check out the answer here!

A. Anonymous class  B. Parent class  C. Nested class  D. Abstract class

8. Choose the option below for which instance of the class cannot be created.

Check out the answer here!

A. True B. False  C. Depends on implementation  D. None

9. Choose whether True or False: The constructor function can be constant.

Check out the answer here!

A. calloc()  B. malloc()  C. Both (a) and (b)  D. create()

10. Dynamic memory allocation can be done using?

Check out the answer here!

11. What are the total catch blocks that can be used using a single Try block?

Check out the answer here!

A. 1  B. 2  C. According to needs  D. Maximum 256

A. constructor  B. destructor  C. class  D. Member function

12. Identify the option below that cannot be used with the term “virtual”.

Check out the answer here!

Are you  Prepared to Assess your Knowledge of OOPS?

Demonstrate your expertise by taking our quiz. Simply click on the ""Try it now"" button to commence. Best of luck!

Improve your  Object-Oriented Programming Skills with Scaler!

Sign up for Scaler's free masterclasses and events to learn about the latest trends in the IT industry and become a pro.  Don't hesitate any longer, register today!