Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alexander Hirsch
703602-Compiler-Construction
Commits
8eaf560d
Commit
8eaf560d
authored
Feb 13, 2020
by
Alexander Hirsch
Browse files
Add pass_array example
parent
de49abc4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
examples/pass_array/pass_array.mc
examples/pass_array/pass_array.mc
+17
-0
examples/pass_array/pass_array.stdin.txt
examples/pass_array/pass_array.stdin.txt
+0
-0
examples/pass_array/pass_array.stdout.txt
examples/pass_array/pass_array.stdout.txt
+1
-0
No files found.
examples/pass_array/pass_array.mc
0 → 100644
View file @
8eaf560d
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;
}
examples/pass_array/pass_array.stdin.txt
0 → 100644
View file @
8eaf560d
examples/pass_array/pass_array.stdout.txt
0 → 100644
View file @
8eaf560d
42
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment