Question PRG-CPP-0041
MediumWhat is the output of this program?
#include <iostream>
using namespace std;
int main() {
int a = 5;
int &r = a;
r += 3;
int b = r;
b++;
cout << a << " " << b;
return 0;
}
- A.
8 9
- B.
9 9
- C.
Sign up free to see the answer and a step-by-step explanation.