summaryrefslogtreecommitdiff
path: root/tests/exec/ref2.cpp
blob: d4d2eb848411e24e43e4fab9e5fb092c5ff63fa1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>

void f(int &y) {
  y = 42;
}

int main() {
  int x = 41;
  std::cout << "x = " << x << "\n";
  f(x);
  std::cout << "x = " << x << "\n";
  x = 41;
  std::cout << "x = " << x << "\n";
}