1. Do you think that will be fine? It seems like he would have made it clearer if that was the case. Right? I am not too sure... I am very new at this.

2. Originally Posted by leopardforest@g
I am not challenging you. But I dont understand why I have to do that? What tells you that you have to calculate it outside of the loop? Am I missing something?
When you calculate an average, it's easier (but not necessary) to compute the sum, and only then divide by the number of elements, once. BTW, you've written the function to assume that the number of elements is 5. You could pass the number of elements as another argument, and then divide by whatever it is.

3. Originally Posted by leopardforest@g
Do you think that will be fine? It seems like he would have made it clearer if that was the case. Right? I am not too sure... I am very new at this.
If you did the loop using a pointer (say named salesp), it would be initialized to sales, then incremented to sales+1, then sales+2, ... and for each value of salesp the corresponding number would be *salesp (instead of *(sales + i)).

4. Originally Posted by robatino
Forgot about that. But it's possible that what the instructor meant was for the loop to use a pointer, and not an int, for the variable.
I doubt it. Write it; tell me that the instructor expected someone to recognize that end condition considering what we have seen so far.

Well, it's not horrible; but it seems to me a stretch.