1. ## Sorting student records by letter grade

I am sorting a file containging student records by grade letter, highest to lowest. I can sort it but my question is how do I make say a B+ be above a B in the order? This is my code:

insert
Code:
```void sortListGrade(STUDENT records[], int count)
{
STUDENT tempData;
int smallest;
int current;
int walk;

for (current = 0; current < count - 1; current++)
{
smallest = current;
for (walk = current + 1; walk <= count - 1; walk++)
{

smallest = walk;
}
tempData = records[current];
records[current] = records[smallest];
records[smallest] = tempData;
}

return;
}```
right now its printing
A
A
B
B+
B-
B-
...

I need it to print
A
A
B+
B
B-
B-
...

2. You'll need to modify how you compare. Don't use strcmp, use something else instead.

Quzah.

3. You could keep strcmp() if you made some other changes. Already, B+ sorts out as less than B-, so that part is done. (The B+ comes higher on the list than B-)

The only problem is the plain grades, without a plus or minus sign. Change your logic so plain grades become a letter and ASCII 44 (a comma). Now the A+'s sort out as less than A's, and the A's sort out before the A-'s.

You'll need to add the if statement, so if a grade[1], is a comma, only the letter grade will be printed, and not the comma.