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
       {
           int x;    
           public:    
           FresherGate(short ss)    
      {        
         cout"Short" int xx)     
      {         
         cout"Int" float ff)     
      {
          cout"Float" cout"Final"; 
      }
    }; 
    int main() 
    {   
         FresherGate *ptr = new FresherGate('B');     
         return 0; 
    }
    

  2. A.

    The program will print the output Short .

    B.

    The program will print the output Int .

    C.

    The program will print the output Float .

    D.

    The program will print the output Final .

    E.

    None of the above

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment