C++ Programming - OOPS Concepts

Exercise :: OOPS Concepts - General Questions

  • OOPS Concepts - General Questions
26. 

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

A. iostream
B. istream
C. ostream
D. ifstream

Answer: Option C

Explanation:

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

27. 

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

A. class
B. member functions
C. constructor
D. destructor

Answer: Option C

Explanation:

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

28. 

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

Explanation:

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

29. 

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

Explanation:

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

30. 

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

Explanation:

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