OOPS
August 29, 2024OOPS
August 29, 2024OOPS
Question 205 |
A __________ is a special method used to initialize the instance variable of a class.
Member function | |
Destructor | |
Constructor | |
Structure |
Question 205 Explanation:
→ A constructor is a special method used to initialize the instance variable of a class.
→ Constructor is a special type of subroutine called to create an object. It prepares the new object for use, often accepting arguments that the constructor uses to set required member variables.
→ Constructor is a special type of subroutine called to create an object. It prepares the new object for use, often accepting arguments that the constructor uses to set required member variables.
Correct Answer: C
Question 205 Explanation:
→ A constructor is a special method used to initialize the instance variable of a class.
→ Constructor is a special type of subroutine called to create an object. It prepares the new object for use, often accepting arguments that the constructor uses to set required member variables.
→ Constructor is a special type of subroutine called to create an object. It prepares the new object for use, often accepting arguments that the constructor uses to set required member variables.