Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write this program , I\'ll rate you good Given the following class definition, p

ID: 3533847 • Letter: W

Question

write this program , I'll rate you good

Given the following class definition, please write a main program to perform three tasks: (a) declare a student object, an array of char and an integer variable; (b) prompt user to input a student name and student id; (c) call set Info() and pass the student name and id inputted from keyboard to the function;(d) output the student name and id by calling printInfo function. #include using namespace std; class student { public: void setInfo(char name[], int a) { int I; For(i=0; name[i] ! =''; i++) studentName[i]=name[i]; sudentName[i]=''; studentId = a; } void printInfo() { cout

Explanation / Answer

void main()

{

student info;

char name[30];

int id;

cout<<"enter name and id of student";

cin>>name>>id;

info.setinfo(name[],id);

info.printinfo();

}