Home / C++ Programming / Functions - C++ :: Discussion

Discussion :: Functions - C++

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

     #include 
     classFreshergateSample 
     {   
         private:   
         int AdditionOne(int x, int y = 1)     
         {        
            return x * y;     
         }       
         public:     
         int AdditionTwo(int x, int y = 1)    
         {    
            return x / y;   
         } 
     };  
     int main() 
     {  
         Freshergateesample objGate;    
         cout4, 8)" ";      
         cout8, 8);      
         return 0;
     }
    

  2. A.

    The program will print the output 32 0.

    B.

    The program will print the output 32 garbage-value.

    C.

    The program will print the output 32 1.

    D.

    The program will report compile time error.

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    No answer description available for this question.


Be The First To Comment