Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pass an array

When we pass an array to a function we pass it by reference. We don't declare the size of array in the function signature, but the function also cannot determine it itself. So here we hard-coded it.

{% emebed include file="src/examples/call-by-ref/call.c" %}

0 0
1 0
2 0
3 0
--------
0 0
1 0
2 2
3 1
--------