1.0100.
Given the record structure and that &student[2] is 7828:
Each record requires: 11 + 28 + 30 + 2 + 2 + 4 + 4 + 4 + 4 = 89 bytes of storage.
The base address of the array would be: 7828 – 2 * 89 = 7828 – 178 = 7650
The linked list would thus appear as:
Addr
ssn
name
address
age
IQ
gpa
balance
next
prev
7650
123456789
Gates, W.
99 Microsoft Ln
38
108
3.87
4500.00
7828
7739
234567890
Ford, H.
17 Michigan Ave
125
115
3.10
250.00
8006
345678901
Trump, D,
1 Trump Tower
55
110
1.86
500.00
NULL
7917
456789012
Astor, J.J.
20 Wall Street
76
100
2.76
1000.00
567890123
Carnegie, A.
100 Steel St.
81
79
2.25
0.00
And the contents of the variables first and last are:
first
last
Therefore:
Yields:
a. printf(“%lu\n”,first); 7917
b. printf(“%lu\n”,last); 7828
c. printf(“%s\n”, first->address); 20 Wall St.
d. printf(“%lu\n”,&student[1].balance); 7739 + 11 + 28 + 30 + 2 + 2 + 4 = 7816
e. printf(“%f5.2\n”,student[3].next->balance); 8006 -> 0.00 (Carnegie’s Balance)
f. printf(“%lu\n”, ++first); Prefix notation: 7917 + 89 = 8006
g. printf(“%d\n”,last->previous->age); 7828 -> 7650 -> 38 (Gate’s age)