123456789101112131415161718192021
#include <iostream> using namespace std; void twice(int n) { n = 2 * n; } int thrice(int n) { return n * 3; } int main() { int x = 1; twice(x); //At this point, I expect x = 2 cout << x << endl; int y = 2; cout << thrice(y) << endl; }
12
1 6
2 6