Question: C + + Change the WEEK - 4 program to work through the gradesBook class. #include #include using namespace std; void sort ( char nm
C
Change the WEEK program to work through the gradesBook class.
#include
#include
using namespace std;
void sortchar nm;
void displaychar name;
int main
char names;
int i;
for i; i; i
cout "Enter name of the student : ;
cin namesi;
sortnames;
displaynames;
return ;
void sortchar nm
char temp;
cout "Sorting names in Ascending Order endl;
for int i ; i ; i
for int j i; j; j
if strcmpnminmj
strcpytempnmi;
strcpynminmj;
strcpynmjtemp;
;
void displaychar nm
cout "Displaying names in Ascending Order endl;
for int i ; i ; i
cout nmi
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
