diff options
Diffstat (limited to 'tests/exec/args2.cpp')
-rw-r--r-- | tests/exec/args2.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/exec/args2.cpp b/tests/exec/args2.cpp new file mode 100644 index 0000000..1d2efee --- /dev/null +++ b/tests/exec/args2.cpp @@ -0,0 +1,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"; +} + |