Question: Here is C code: struct code { char size[16]; struct code *next; } My question: If I were to draw a linked list, of the
![Here is C code: struct code { char size[16]; struct code](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f90f2180b2b_36966f90f211d566.jpg)
Here is C code:
struct code {
char size[16];
struct code *next;
}
My question:
If I were to draw a linked list, of the stack. I got the following:
0x601050 ---> 0x601070 -----> 0x601030 -------> 0x601090 ------> 0x601010 -----> 0x6010b0 ----> NULL
Is this correct?.
Also:
How would I determine the sentence being stored in this linked list?.
$1 = (struct inode *) 0x601050 (gdb) x/60x 0x601000 0x601000 0x601010: 0x601020: 0x601030 0x601040 0x601050 0x601060 0x601070: 0x601080 0x601090 0x6010a0: 0x6010be 0x6010ce: 0x6010de 0x6010e0: 0x00000000 0x7247282d 0x00601ebe 0x6c756f63 0x00601090 0x79656854 0x00601070 0x706d6f63 0x00601030 0x61206f64 0x00601010 0x32353931 0x00000000 0x00000000 0x00000000 0x00000000 0x20656361 0x00000000 0x6e6f2064 0x00000000 0x6c6f7420 0x00000000 0x72657475 0x00000000 0x68746972 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000021 0x70706f48 0x00000021 0x0000796c 0x00000021 0x656d2064 0x00000021 0x00000073 0x00000021 0x6974656d 0x00000021 0x00000000 0x00020f41 0x00000000 0x00000000 0x00000000 0x00007265 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00002e63 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 $1 = (struct inode *) 0x601050 (gdb) x/60x 0x601000 0x601000 0x601010: 0x601020: 0x601030 0x601040 0x601050 0x601060 0x601070: 0x601080 0x601090 0x6010a0: 0x6010be 0x6010ce: 0x6010de 0x6010e0: 0x00000000 0x7247282d 0x00601ebe 0x6c756f63 0x00601090 0x79656854 0x00601070 0x706d6f63 0x00601030 0x61206f64 0x00601010 0x32353931 0x00000000 0x00000000 0x00000000 0x00000000 0x20656361 0x00000000 0x6e6f2064 0x00000000 0x6c6f7420 0x00000000 0x72657475 0x00000000 0x68746972 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000021 0x70706f48 0x00000021 0x0000796c 0x00000021 0x656d2064 0x00000021 0x00000073 0x00000021 0x6974656d 0x00000021 0x00000000 0x00020f41 0x00000000 0x00000000 0x00000000 0x00007265 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00002e63 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
