Question PRG-CPP-0068
HardWhat is the output of this program?
#include <iostream>
using namespace std;
int main() {
int x = 10;
int &r = x;
int *p = &r;
*p = 20;
r++;
cout << x;
return 0;
}
- A.
11
- B.
20
- C.
Sign up free to see the answer and a step-by-step explanation.