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

int main() {
  int x = 41;
  std::cout << "x = " << x << "\n";
  int *y = &x;
  *y = 42;
  std::cout << "x = " << x << "\n";
  *y = *y + 1;
  std::cout << "x = " << x << "\n";
}