Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

Cpp Programming Quiz 10 – 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
int i, j;
class IndiaBix
{
public:
IndiaBix(int x = 0, int y = 0)
{
i = x;
j = x;
Display();
}
void Display()
{
cout<< j <<" "; } }; int main() { IndiaBix objBix(10, 20); int &s = i; int &z = j; i++; cout<< s-- << " " << ++z; return 0; }

[A].The program will print the output 0 11 21.
[B].The program will print the output 10 11 11.
[C].The program will print the output 10 11 21.
[D].The program will print the output 10 11 12. 

Answer: Option B