OOPS in C++ MCQs Exercise I


Ques 1 OOPS


Which of the following is true about OOPs?
  a) OOPs are used to implements real world entities.
  b) OOPs are used to Minimize the code size.
  c) OOPs controls the levels of access.
  d) All of these


d is the correct option





Ques 2 OOPS


How many types of access modifiers are in C++?
  a) 2
  b) 3
  c) 4
  d) 5


b is the correct option





Ques 3 OOPS


Which of the following is not an access modifier in C++?
  a) public
  b) private
  c) protected
  d) internals


d is the correct option





Ques 4 OOPS


Which of the following is true about static keywords in C++?
  a) Static methods can only access static members (data and methods)
  b) Static methods cannot be overloaded.
  c) Static data members can only be accessed by static methods.
  d) Non-static data members can be accessed by static methods.


a is the correct option





Ques 5 OOPS


Which of the following is not a type of constructor in C++?
  a) Copy Constructor
  b) Default Constructor
  c) Parameterized constructor
  d) Child Constructor


d is the correct option





Ques 6 OOPS


Which of the following access specifier is used as a default in a class definition?
  a) protected
  b) public
  c) private
  d) interface


b is the correct option





Ques 7 OOPS


Which inheritance type is used in the class given below?
class A : public B, public C
{}
  a) Multilevel inheritance
  b) Multiple inheritance
  c) Hybrid inheritance
  d) Hierarchical Inheritance


b is the correct option