Question: For each of the following data structure declarations, determine the offset of each field, the total size of the data structure, and its alignment requirement
For each of the following data structure declarations, determine the offset of each field, the total size of the data structure, and its alignment requirement under Linux/IA64. A) struct r1 { int array[4]; int sum; char ch1; }; B) struct r2 { size_t ul[3]; char ch2; double d1; }; C) struct r3 { short s[5]; char *p[2]; }; D) union u { double *d2 ; char ch3; struct r3 *next; };
(computer system language)
i use this book ( Computer Systems: A Programmer's Perspective Authors: Randal E. Bryant and David R. O'Hallaron Publisher: Addison Wesley; 2 nd edition)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
