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

Discussion :: Objects and Classes

  1. What will be the output of the following program?

       #include
       class BixTeam 
       {     
           int x, y;    
           public:     
           BixTeam(int xx)   
           {       
                 x = ++xx;    
           }   
           void Display()   
           {       
                cout" ";  
          } 
      }; 
      int main() 
     {    
          BixTeam objBT(45);   
          objBT.Display();    
          int *p = (int*)&objBT;    
          *p = 23;     
          objBT.Display();     
          return 0; 
     }
    

  2. A.

    45 22

    B.

    46 22

    C.

    45 23

    D.

    46 23

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    No answer description available for this question.


Be The First To Comment