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
- A.
Function 1
- B.
Function 2
- C.
Function 3
- D.
Function 5
Attempted by 182 students.
Show answer & explanation
Correct answer: A
A default constructor is a constructor that takes no parameters. In the given class, FUN() (Function1) has no parameters, so it is the default constructor.