I have written this code to take 10 grades and average them, but the average is always like 75383571085315%. I have no idea why the number is so large and wrong. Can somebody help me?
Another problem is that your array is being passed by value. This means that a copy is being changed and nothing is being changed in the actual array.
That's a misunderstanding.
When an array is passed as a function parameter, what is actually passed is a pointer to the start of the array. Yes, the pointer itself is passed by value, but that doesn't prevent it from being dereferenced to access the actual contents of the original array.
Oh, thanks for the advice everyone. I didn't realize i was trying to get the average before i got the grades, so it was messing everything up. Thanks again.