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

int test(int a) {
    int *b = &a;
    *b = *b + 42;
    return a;
}

int main() {
    int x = 0;
    int y = test(x);
    std::cout << "x = " << x << "\n";
    std::cout << "y = " << y << "\n";
}