This question is based on the following C++ code segment and class FUN:
This question is based on the following C++ code segment and class FUN:
class FUN
{
int CODE ;
public :
FUN ( ); //Function1
FUN (int C); //Function2
FUN (FUN & F); //Function3
void DISP ( ); //Function4
~FUN ( ); //Function5
};
void main ( )
{
FUN F1 ;
______ // BLANK
______
}
Which of the following is called a destructor of the class FUN ?
Show answerHide answer
Correct answer: (D) FUNCTION 5
Explanation
A destructor has the class name with a tilde and no arguments, so ~FUN() (Function 5) is the destructor.