Aggregate operations allowed

Which aggregate operations allowed on struct variables are not allowed on an array variable? (5)

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. (2, 3, 6, 7, 8) a. student.gpa = 3.76;

b. student.name.last= “Anderson”;

c. classList[1].name = student;

d. classList[0].callNum = 0;

e. student.name = classList[10].name;

f. course = classList[0];

g. cin <>

h. for (int j = 0; j < 100;=”” j++) =”” classlist[j].course=””>

i. classList.name.last = ” “;

j. course.credits = studentType.course.credits;

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X