Home » C++ Programming » References

What will be the output of the following program? #include enum xyz { a, b, c }; int main() { int x = a, y = b, z = c; int &p = x, &q = y, &r = z; p = z; p = ++q; q = ++p; z = ++q + p++; cout<< p << " " << q << " " << z; return 0; }

Correct Answer: 4 4 7

← Previous Question Next Question→

More Questions from References

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion