Consider the following statements: struct nameType struct courseType struct studentType { { { string 1 answer below »

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Order a Similar Paper Order a Different Paper

Consider the following statements:

struct nameType              struct courseType           struct studentType

{                                              {                                             {

string first;                                          string name;                                     nameType name;

string last;                                           int callNum;                                       double gpa;

};                                                             int credits;                                          courseType course;

char grade;                         };

};

studentType student;

studentType classList[100];

courseType course;

nameType name;

Mark the following statements as valid or invalid. If a statement is invalid, explain why.

a. student.course.callNum = “CSC230”;

b. cin >> student.name;

c. classList[0] = name;

d. classList[1].gpa = 3.45;

e. name = classList[15].name;

f. student.name = name;

g. cout << classList[10] << endl;

h. for (int j = 0; j < 100; j++)

classList[j].name = name;

i. classList.course.credits = 3;

j. course = studentType.course;