MCQs – C++ OOPs

(Last Updated On: March 13, 2019)
Q) The OOPs concept in C++, exposing only necessary information to users or clients is known as
  1. Abstraction
  2. Encapsulation
  3. Data hiding
  4. Hiding complexity
View Answer
Answer: A

 

Q) Which of the following is an abstract data type?
  1. Class
  2. Int
  3. String
  4. Double
View Answer
Answer: A

Q) Hiding the complexity is known as
  1. Abstraction
  2. Encapsulation
  3. Data hiding
  4. Composition
View Answer
Answer: B

Q) For Cat and Animal class, correct way of inheritance is
  1. class Cat: public Animal
  2. class Animal: public Cat
  3. Both are correct way
  4. None is correct way
View Answer
Answer: A