So if i have to write a program that dynamically allocates an array large enough to hold a user-defined number of test scores. Once all the scores are entered, the array should be passed to a function that sorts them in ascending order. Another function should be called that calculates the average score. The program should display the sorted list of scores and averages with appropriate headings. Use pointer notation rather than array notation whenever possible.
Input Validation: Do not accept negative numbers for test scores.
Did i do this right??? Although I think I missed something at the bottom, but the program still works
Thanks, the only thing i'm alittle confused about is how to sort the numbers. I know I need a for loops. But can I create my own variables or do I have to use the ones from before?
In your sort function, the only variables that will be defined for you when you enter it are arr and size. If you need more variables to sort the array, of course you should declare/define/use them.