Home / C++ Programming / References :: Discussion

Discussion :: References

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

     #include
      int i, j;  class Freshergate
      {
         public:    
         Freshergate(int x = 0, int y = 0)   
         {        
              i = x;         
              j = x;      
              Display();    
             }     
             void Display()    
             {      
                cout" ";     
                } 
            };
    
       int main() 
       {     
         Freshergate objBix(10, 20);    
          int &s = i;  
          int &z = j;      
          i++;  
          cout" "
          return 0;
      }
    

  2. A.

    The program will print the output 0 11 21.

    B.

    The program will print the output 10 11 11.

    C.

    The program will print the output 10 11 21.

    D.

    The program will print the output 10 11 12.

    E.

    It will result in a compile time error.

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment