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

Discussion :: Functions - C++

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

    #include 
     class Freshergate 
     {   
        int x, y, z;   
        public:    
        Freshergate(int x = 100, int y = 30, int z = 0)  
        {      
           this->x = x;   
           this->y = y;     
           this->z = z;       
           Display();     
       }   
       void Display()  
       {     
           cout" " " " int main()
     {    
        int a = 0, b = 1, c = 2;   
        int &x = ++a;    
        int &y = --b;     
        int z = c + b - -c;      
        Freshergate objGate(x, y, z);      
        return 0; 
     }
    

  2. A.

    The program will print the output 1 0 3.

    B.

    The program will print the output 1 0 4.

    C.

    The program will print the output 1 1 3.

    D.

    The program will print the output 1 1 4.

    E.

    The program will report compile time error.

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment