Question: struct StudentRecord 4. A record and two variables are declared: Assume that a char takes one memory location, an int takes 2 locations, and a

struct StudentRecord 4. A record and two variables are declared: Assume that a char takes one memory location, an int takes 2 locations, and a float number takes 4 locations, and that the struct members are found in contiguous memory locations with no gaps char firstName[15]; char lastName[25]; int id; float pga int currentHours; int totalHours; (a) Construct a member-length-offset table for StudentRecord. StudentRecord student Member Length offset StudentRecord students(10]; firstName lastName id gpa currentHour totalHours (b) How much space does the compiler set aside for student? (c) if the base address of student is 2000, what address does the compiler generate for studutent. gpa? (d] If the base address of students is 5000, what address does the compiler generate for studutentsf4j-gpa
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
