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

Discussion :: Constructors and Destructors

  1. Which of the following statement is correct about the program given below?

    #include 
     class Freshergate
    {     public:    
          Freshergate()   
      {        
          cout"Fresher";   
      }    
     ~Freshergate()    
      {       
          cout"GATE";    
      } 
    }; 
    int main() 
    {    
     Freshergate objGATE;    
       return 0;  
    }
    

  2. A.

    The program will print the output Fresher.

    B.

    The program will print the output GATE.

    C.

    The program will print the output FresherGATE

    D.

    The program will report compile time error.

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    No answer description available for this question.


Be The First To Comment