C++ Programming - OOPS Concepts

Exercise :: OOPS Concepts - General Questions

  • OOPS Concepts - General Questions
11. 

Why reference is not same as a pointer?

A. A reference can never be null.
B. A reference once established cannot be changed.
C. Reference doesn't need an explicit dereferencing mechanism.
D. All of the above.

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.

12. 

cout is a/an __________ .

A. operator
B. function
C. object
D. macro

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

13. 

Which of the following concepts provides facility of using object of one class inside another class?

A. Encapsulation
B. Abstraction
C. Composition
D. Inheritance

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

14. 

How many types of polymorphisms are supported by C++?

A. 1
B. 2
C. 3
D. 4

Answer: Option B

Explanation:

The two main types of polymorphism are run-time (implemented as inheritance and virtual functions), and compile-time (implemented as templates).

15. 

Which of the following is an abstract data type?

A. int
B. double
C. string
D. Class

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.