Add pass_array example

This commit is contained in:
Alex Hirsch 2020-02-13 22:41:46 +01:00
parent de49abc455
commit 8eaf560d0c
3 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,17 @@
void foo(int[10] array)
{
array[5] = 42;
}
int main()
{
int[10] array;
array[5] = 23;
foo(array);
print_int(array[5]);
print_nl();
return 0;
}

View File

View File

@ -0,0 +1 @@
42