General Questions (Set - 1)

Question 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

Question 12 :

cout is a/an __________ .


A). operator
B). function
C). object
D). macro
Answer : Option C

Question 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

Question 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).


Question 15 :

Which of the following is an abstract data type?


A). int
B). double
C). string
D). Class
Answer : Option D