This question is based upon the following class and code segment: class STOCK…

NVS TGT/PGT 2022

This question is based upon the following class and code segment: class STOCK { float price; public: STOCK(); // Function 1 STOCK(float P); // Function 2 STOCK(STOCK &S); // Function 3 void INIT(); // Function 4 void DISP(); // Function 5 ~STOCK(); // Function 6 }; void main() { STOCK S2(10); // Statement 1 ________ // Other Statements } Which of the following constructor will be invoked automatically because of the declaration given as Statement 1 in the given code?

  1. A.

    Function 2

  2. B.

    Copy Constructor

  3. C.

    Function 1

  4. D.

    Function 3

Attempted by 222 students.

Sign up free to check your answer

Sign up free

Explore the full course: Bpsc

Loading lesson…