Inheritance in C++ Exercise I


Ques 1 Inheritance


Which of the following about inheritance?
  a) Inheritance implements Method overloading and method overriding.
  b) Classes with same names.
  c) Deriving new classes from existing classes.
  d) Wrapping of data and method into a single class.


c is the correct option




Ques 2 Inheritance


Which of the following is the correct way to inherit the class?
  a) class A: B {}
  b) class A extends B {}
  c) class A : public B { }
  d) class A extends public B()


c is the correct option




Ques 3 Inheritance


In which programming Language multiple inheritance is exists ?
  a) C
  b) C++
  c) Java
  d) All of these


b is the correct option




Ques 4 Inheritance


Which of the following are types of inheritance?
  a) Multiple Inheritance
  b) Muti Level Inheritance
  c) Single Level Inheritance
  d) All of these


d is the correct option




Ques 5 Inheritance


Which of the following best describes the inheritance?

i) Inheritance hides the data to implementation.
ii) Any parent class can access the member of the child class.
iii) A class can access the members of another class just like their own definition.
iv) A class cannot access the members of another class just like their own definition.

  a) i only
  b) i and iii only
  c) iii only
  d) None of these


c is the correct option