I was writing a program for sorting the test scores using array of pointers and dynamic memory allocation. Surprisingly, I am getting indefinite values after sorting. I wrote a header file, .cpp file and main. cpp.
Actually, after sorting I thought of adding an average function in .cpp file and can call that function in main.
But first of all, I am unable to sort the test scores properly.
Can anybody tell me where I went wrong?
I am sending my code as attachment.
Thanks in advance.