e.g. // function sum // on entry len is the length of the array, // arr is a pointer to an array of ints // this function adds all the elements of // the array together and returns the result proc int sum(int len, int *arr) int acc, j acc = 0 for j=0 while j<len step j+=1 do acc = acc + arr[j] done return acc endproc proc main() int height[10] // NOTE: here we pass the addresses of // fred and bert not their values average = sum(10, &height) / 10 endproc