Which of the following statements with reference to constructor and destructor…
PYQ DSSSB 2022
Which of the following statements with reference to constructor and destructor in C++ is FALSE?
- A.
The destructor can have parameters, but the constructor does not receive any parameters.
- B.
A constructor is called by the compiler whenever the object of the class is created.
- C.
A destructor is called by the compiler when the object is destroyed.
- D.
Both constructor and destructor can be defined as public, private, or protected.
Attempted by 621 students.
Sign up free to check your answer
Sign up freeLoading lesson…

