OOPS
August 29, 2024OOPS
August 29, 2024OOPS
Question 30
|
How constructor differ from destructor?
Constructors can be overloaded but destructors can’t be overloaded
|
|
Constructors can take arguments but destructor can’t
|
|
Constructors can be overloaded but destructors can’t be overloaded and Constructors can take arguments but destructor can’t
|
|
None of the given options
|
Question 30 Explanation:
Constructors can be overloaded but destructors can’t be overloaded.
Destructors cant be overloaded because your code wouldn’t have a clue about which destructor it needs to call when you destroy an object.
Destructors cant be overloaded because your code wouldn’t have a clue about which destructor it needs to call when you destroy an object.
Correct Answer: C
Question 30 Explanation:
Constructors can be overloaded but destructors can’t be overloaded.
Destructors cant be overloaded because your code wouldn’t have a clue about which destructor it needs to call when you destroy an object.
Destructors cant be overloaded because your code wouldn’t have a clue about which destructor it needs to call when you destroy an object.
Subscribe
Login
0 Comments