Quiznetik

Object Oriented Programming Using C++ | Set 1

1. Which of the two features match each other?

Correct : C. Encapsulation and Abstraction

2. What is default access specifier for data members or member functions declared within a class without any specifier, in C++?

Correct : A. Private

3. If a function can perform more than 1 type of tasks, where the function name remains same, which feature of OOP is used here?

Correct : C. Polymorphism

4. Which feature in OOP is used to allocate additional function to a predefined operator in any language?

Correct : A. Operator Overloading

5. Which among the following best defines abstraction?

Correct : D. Hiding the implementation and

6. A base class is also known as class.

Correct : C. Super

7. If class A is derived from another derived class B which is derived from class C, which class will have maximum level of abstraction?

Correct : C. Class C

8. Derived class is also known as

Correct : A. Sub Class

9. Which of the following gets called when an object is being created?

Correct : A. Constructor

10. Destructor has a same name as the constructor and it is preceded by?

Correct : C. ~

11. Which of the following is called address operator?

Correct : B. &

12. Which of the following is used for comments in

Correct : A. //comment

13. What is used to read from the console in C++?

Correct : A. cin

14. What is used to write/display to the console in C++?

Correct : B. cout

15. Which operator is used with cin ?

Correct : A. >>

16. Which operator is used with cout?

Correct : B. <<

17. Which feature of OOP indicates code reusability?

Correct : B. Inheritance

18. Which feature can be implemented using

Correct : B. Abstraction

19. Which of the following is not a type of Constructor?

Correct : A. Friend constructor

20. What is the other name used for functions inside a

Correct : B. Member functions

21. Which among the following can restrict class members to get inherited?

Correct : A. Private

22. Which type of members can’t be accessed in derived classes of a base class?

Correct : B. Private

23. Which of the following is true?

Correct : B. Objects of a class do not share non-static members. Every object has its own copy

24. Which among the following is not true for polymorphism?

Correct : D. Increases overhead of function

25. If different properties and functions of a real world entity is grouped or embedded into a single element, what is it called in OOP language?

Correct : D. Encapsulation

26. If same message is passed to objects of several different classes and all of those can respond in a different way, what is this feature called?

Correct : C. Polymorphism

27. Out of the following, which is not a member of the

Correct : B. Friend function

28. Which of the following is an abstract data type?

Correct : C. class

29. Which of the following is not a type of inheritance?

Correct : C. Distributive

30. Which of the following is correct in C++?

Correct : B. Structures can have member functions