References - Programming

Q1:

Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeCrack
{
    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()
{
    AptitudeCrack objAptitude;
    int x  = 2;
    int &y = x;
    y = 5;
    objAptitude.SetValue(x, ++y, x + y);
    objAptitude.Display();
    return 0; 
}

A The program will print the output 5 6 10.

B The program will print the output 6 6 10.

C The program will print the output 6 6 12.

D It will result in a compile time error.

ANS:B - The program will print the output 6 6 10.

No answer description is available. Let's discuss.