Q.1
Encapsulation and abstraction differ as ____________
  • a) Hiding and hiding respectively
  • b) Binding and Hiding respectively
  • c) Hiding and Binding respectively
  • d) Can be used any way
Q.2
Which feature of OOP is exhibited by the function overriding?
  • a) Polymorphism
  • b) Encapsulation
  • c) Abstraction
  • d) Inheritance
Q.3
How to access the private member function of a class?
  • a) Using class address
  • b) Using object of class
  • c) Using object pointer
  • d) Using address of member function
Q.4
Which keyword should be used to declare static variables?
  • a) const
  • b) common
  • c) static
  • d) stat
Q.5
Which is correct syntax for declaring pointer to object?
  • a) *className objectName;
  • b) className* objectName;
  • c) className objectName();
  • d) className objectName;
Q.6
Which class/set of classes can illustrate polymorphism in the following C++ code? abstract class student { public : int marks; calc_grade(); } class topper:public student { public : calc_grade() { return } }; class average:public student { public : calc_grade() { return } }; class failed{ int marks; };
  • a) Only class student and topper together can show polymorphism
  • b) Only class student can show polymorphism
  • c) Class failed should also inherit class student for this code to work for polymorphism
  • d) All class student, topper and average together can show polymorphism
Q.7
If data members are private, what can we do to access them from the class object?
  • a) Private data members can never be accessed from outside the class
  • b) Create public member functions to access those data members
  • c) Create private member functions to access those data members
  • d) Create protected member functions to access those data members
Q.8
Which among the following is not a necessary condition for constructors?
  • a) Its name must be same as that of class
  • b) It must not have any return type
  • c) It must contain a definition body
  • d) It can contains arguments
Q.9
Object being passed to a copy constructor ___________
  • a) Must not be mentioned in parameter list
  • b) Must be passed with integer type
  • c) Must be passed by value
  • d) Must be passed by reference
Q.10
If in multiple inheritance, class C inherits class B, and Class B inherits class A. In which sequence are their destructors called if an object of class C was declared?
  • a) ~A() then ~B() then ~C()
  • b) ~C() then ~A() then ~B()
  • c) ~C() then ~B() then ~A()
  • d) ~B() then ~C() then ~A()
Q.11
Instance of which type of class can’t be created?
  • a) Parent class
  • b) Abstract class
  • c) Anonymous class
  • d) Nested class
Q.12
___________ underlines the feature of Polymorphism in a class.
  • a) Virtual Function
  • b) Inline function
  • c) Enclosing class
  • d) Nested class
Q.13
Which feature in OOP is used to allocate additional functions to a predefined operator in any language?
  • a) Function Overloading
  • b) Function Overriding
  • c) Operator Overloading
  • d) Operator Overriding
Q.14
Which feature can be implemented using encapsulation?
  • d) Abstraction
  • a) Polymorphism
  • b) Overloading
  • c) Inheritance
0 h : 0 m : 1 s