Which of the following statement is correct about the program given below? #include<iostream.h> class IndiaBix { int a, b, c; public: void SetValue(int x, int y ,int z) { a = x; b = y; c = z; } void Display() { cout<< a << " " << b << " " << c; } }; int main() { IndiaBix objBix; int x = 2; int &y = x; y = 5; objBix.SetValue(x, ++y, x + y); objBix.Display(); return 0; }
1.The program will print the output 5 6 10.
2.The program will print the output 6 6 10.
3.The program will print the output 6 6 12.
4.It will result in a compile time error.
Posted Date:-2021-02-24 09:30:50