General Questions (Set - 2)

Question 6 :

Which of the following is the correct class of the object cout?


A). iostream
B). istream
C). ostream
D). ifstream
Answer : Option C

Question 7 :

Which of the following cannot be used with the keyword virtual?


A). class
B). member functions
C). constructor
D). destructor
Answer : Option C

Question 8 :

Which of the following functions are performed by a constructor?


A). Construct a new class
B). Construct a new object
C). Construct a new function
D). Initialize objects
Answer : Option D

Question 9 :

Which of the following problem causes an exception?


A). Missing semicolon in statement in main().
B). A problem in calling function.
C). A syntax error.
D). A run-time error.
Answer : Option D

Question 10 :

Which one of the following options is correct about the statement given below? The compiler checks the type of reference in the object and not the type of object.


A). Inheritance
B). Polymorphism
C). Abstraction
D). Encapsulation
Answer : Option B