diff options
Diffstat (limited to 'out.c')
-rw-r--r-- | out.c | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -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; } |