summaryrefslogtreecommitdiff
path: root/out.c
diff options
context:
space:
mode:
Diffstat (limited to 'out.c')
-rw-r--r--out.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/out.c b/out.c
index 720322c..cd8f28b 100644
--- a/out.c
+++ b/out.c
@@ -2,14 +2,21 @@
/* toc */
#include <stdio.h>
-void foo(int64_t (*out__)[3]) {
- int64_t x[3] = {0};
- *out__ = x;
- return;
+void foo(int64_t (*out__)[3][3]) {
+ int64_t av___0[3][3] = {{0}};
+ int64_t (*x)[3] = av___0;
+ memcpy(*out__, x, 9 * sizeof(int64_t )); return;
}
void main__(void) {
- int64_t x[3] = foo();
- printf("Foo: %ld\n", (long)x);
+ int64_t av___1[3][3];
+ foo(&av___1);
+ int64_t (*x)[3] = av___1;
+
+for (int i = 0; i < 3; i++)
+ for (int j = 0; j < 3; j++)
+ printf("%ld", x[i][j]);
+puts("");
+ ;
return;
}