This question is based on the following C++ code segment and class FUN: class…

2022

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

  1. A.

    Function 1

  2. B.

    Function 2

  3. C.

    Function 3

  4. D.

    Function 5

Attempted by 174 students.

Show answer & explanation

Correct answer: D

A destructor is a special member function whose name is the same as the class name but prefixed with a tilde (~). It has no parameters and no return type. In the given class, ~FUN() (Function5) is the destructor.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs