Home / C++ Programming / Constructors and Destructors :: Discussion

Discussion :: Constructors and Destructors

  1. Which of the following constructor is used in the program given below?

     #include 
     class Freshergate
     {   
          int x, y;
          public:    
          FresherGATE(int xx = 10, int yy = 20 )  {     
             x = xx;    
             y = yy;   
          }   
          void Display()   
          {      
             cout" " int main() 
     {   
        Freshergate objGATE;      
        objGATE.Display(); 
        return 0;
     }
    
    

  2. A.

    Copy constructor

    B.

    Simple constructor

    C.

    Non-parameterized constructor

    D.

    Default constructor

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    No answer description available for this question.


Be The First To Comment