結果 : sum of elements in an array using pointers and functions