C++ Programming - OOPS Concepts

Exercise :: OOPS Concepts - General Questions

  • OOPS Concepts - General Questions
46. 

Which of the following keyword is used to overload an operator?

A. overload
B. operator
C. friend
D. override

Answer: Option B

Explanation:

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

47. 

What will happen if a class is not having any name?

A. It cannot have a destructor.
B. It cannot have a constructor.
C. It is not allowed.
D. Both A and B.

Answer: Option D

Explanation:

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

48. 

Which inheritance type is used in the class given below?
class A : public X, public Y
{}

A. Multilevel inheritance
B. Multiple inheritance
C. Hybrid inheritance
D. Hierarchical Inheritance

Answer: Option B

Explanation:

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

49. 

Which one of the following is correct about the statements given below?

  1. All function calls are resolved at compile-time in Procedure Oriented Programming.
  2. All function calls are resolved at compile-time in OOPS.

A. Only II is correct.
B. Both I and II are correct.
C. Only I is correct.
D. Both I and II are incorrect.

Answer: Option C

Explanation:

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

50. 

Which of the following is an invalid visibility label while inheriting a class?

A. public
B. private
C. protected
D. friend

Answer: Option D

Explanation:

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