So can I call destructor explicitly if I create an object for a class using new operator?
yes, in case of creating an object using new operator, you can call destructor explicitly.
No, it is a compile time error.
It is not advisable. Just like an automatic variables destructor will be called once it goes out of scope, similarly destructor of your newly created object (with new operator) will be called once you apply delete on your object. Until then your destructor will not be called. If you call programmatically also, again c++ system will also call when you apply delete operator on it.
option 3 is wrong
Back To Top