Quiz · References and Pointers · lesson 3 of 8
Quiz — reference or pointer
What does the program print?
#include <iostream>
int main() {
int a = 1;
int b = 2;
int& r = a;
int* p = &a;
r = b;
p = &b;
*p = 3;
std::cout << a << ' ' << b << '\n';
}