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

Consider the following type student_t and the two variables stul and stu2. typed

ID: 3568826 • Letter: C

Question

Consider the following type student_t and the two variables stul and stu2.
typedef struct
{ char first_name[20],
last_name[20];
int score;
char grade;
}student_t;
student_t stul, stu2;
Identify the following statements as possibly valid or definitely invalid. If invalid, explain why.
(a) student_t stu_list[30];
(b) printf("%s", stul);
(c) printf("%d %c", stul.score, stul.grade);
(d) stu2 = stul;
(e) if(stu2.score == stul.score)
printf("Equal");
(f) if(stu2 == stul)
printf("Equal structures");
(g) scan_student(&stul);
(h) stu2.last_name = "Martin";

Explanation / Answer

b)printf can print primitive data types but not the user defined data types.