हिंदी

Write any four characteristics of destructor function.

Advertisements

प्रश्न

Write any four characteristics of destructor function.

State any four characteristics of Destructor.

लघु उत्तरीय
Advertisements

उत्तर

  1. The name of a destructor is identical to the class name, but it is written with a tilde (~) symbol before it.
    Example: ~fib(){.... message ....}
  2. A destructor is declared without any return type because it does not return a value.
  3. A destructor does not accept any parameters.
  4. It is usually declared with public access in the class definition.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?

APPEARS IN

Advertisements
Share
Notifications



      Forgot password?
Use app×