Quote Originally Posted by LightYear View Post
N is in the #define is that ok?
Ah, I hadn't noticed that. Sorry, when I skimmed the code the first time I subconsciously mistook this
Code:
printf("Enter %d grades: ", N);
for a scanf request to set N. Pretty stupid of me, sorry again.

In this case, you don't need to use malloc or a parameter to findHighest(). #defines are global, you can refer to them directly everywhere. So:
Code:
float findHighest(float grades[N]);
should be the prototype, and you can use N inside that function.

That's why I had all that stuff about getting a value from the user...I have to pay better attention...