SyntaxFix
Write A Post
Hire A Developer
Questions
You are passing the value of the memory location of the first member of the array.
Therefore when you start modifying the array inside the function, you are modifying the original array.
Remember that a[1] is *(a+1).
a[1]
*(a+1)