For a student information system the following data structures arc in place: str
ID: 3575138 • Letter: F
Question
For a student information system the following data structures arc in place: struct personal {ist student lD; int age;}; struct student {struct personal private; double gpa;}; We use these structures to initialize throe students: struct student Mary = {{123456789, 19}, 3.6}; struct student John = {{987654321, 18}, 3.7}; struct student Luis = {{135792458, 20}, 3.65}; struct student *pm = & Mary, *pj = &john;, *pl = &luis; Some of the data references in this problem are invalid; this is not a typographical error. You are being asked to recognize them, but not to correct them. Fill in the blanks with correct data. If a reference is Incorrect C usage, write '"NA" (for Not Applicable) in the blank:Explanation / Answer
3)
Blank 1 - NA (since age can only be accessed using personal structure variable but not directly)
Blank 2 - 19 (we can access only structure variable)
Blank 3 - 3.7 (there is direct access to gpa In student structure )
Blank 4 - 987654321 (same as blank 2)
Blank 5 - NA (because internal structure variables cannot be accessed using -> because it is not a pointer)
4)
data[2] (since it access float value not address)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.