Home / C++ Programming / Objects and Classes :: Discussion

Discussion :: Objects and Classes

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

    #include 
     class BixBase 
     {   
        int x, y;   
        public:    
        GateBase(int xx = 10, int yy = 10)             
        {    
            x = xx;    
            y = yy;  
       }   
       void Show()   
       {       
         coutclass GateDerived : 
     {  
       private:    
           GateBase objBase;  
        public:  
       GateDerived(int xx, int yy) : GateBase(xx, yy)  
       {      
         objBase.Show();   
       } 
    }; 
    int main()
     {    
       GateDerived objDev(10, 20);       
       return 0; 
     }
    

     

  2. A.

    The program will print the output 100.

    B.

    The program will print the output 200.

    C.

    The program will print the output Garbage-value.

    D.

    The program will report compile time error.

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    No answer description available for this question.


Be The First To Comment