summaryrefslogtreecommitdiff
path: root/tests/exec/args1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/exec/args1.cpp')
-rw-r--r--tests/exec/args1.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/exec/args1.cpp b/tests/exec/args1.cpp
new file mode 100644
index 0000000..52edd82
--- /dev/null
+++ b/tests/exec/args1.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+
+int f(int a, int b, int c, int d, int e, int f) {
+ std::cout << "a = " << a << ", b = " << b <<
+ ", c = " << c << ", d = " << d << ", e = " <<
+ e << ", f = " << f << "\n";
+ return a + b + c + d + e + f;
+}
+
+int main() {
+ int x = f(1, 2, 3, 4, 5, 6);
+ std::cout << "x = " << x << "\n";
+}