Cpp Programming Quiz 12 – Which of the following statement is correct about the program given below?

Question: Which of the following statement is correct about the program given below?

#include
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; }

[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. 

Answer: Option B