for struct it\'s char char int int 12] 11 character student id declared major (e
ID: 3795545 • Letter: F
Question
for struct it's
char
char
int
int
Explanation / Answer
a) size of 1 member of studentM, it is 24 .
in c++, size of int data type is 4. size of char data type is 1
char szStudentId [12] // 12*1= 12
char szMajor [4] // 4*1 = 4
int IGradePoint // 1*4 = 4
int iCreditHours // 1*4 = 4
studentM has 12 members. here the question is about the size of 1 member of studentM, it is 24 .
b ) Total size of the studentM array is 240.
studentM [10] // studentM has 10 elements.
size of 1 member of studentM 24 . so, 10*24 = 240
************************END**************PLS GIVE ME GOOD RATING*********************************************
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.