Question
struct lnode { char *str; // points to 16 character string struct lnode *next; } And we know that the variable list is the start
struct lnode { char *str; // points to 16 character string
struct lnode *next; }
And we know that the variable list is the start of the list, so we execute the following command in gdb to find the start of
the list
(gdb) print list $2 = (struct lnode *) 0x601150
(gdb) x/52gx 0x601000
0x601000: 0x601010: 0x601020: 0x601030: 0x601040: 0x601050: 0x601060: 0x601070: 0x601080: 0x601090: 0x6010a0: 0x6010b0: 0x6010c0: 0x6010d0: 0x6010e0: 0x6010f0: 0x601100: 0x601110: 0x601120: 0x601130: 0x601140: 0x601150: 0x601160: 0x601170: 0x601180: 0x601190: | 0x0000000000000000 0x0000000000601170 0x0000000000000000 0x0000000000601070 0x0000000000000000 0x207469202c65636e 0x0000000000000000 0x6b20666f20796d65 0x0000000000000000 0x0000000000601050 0x0000000000000000 0x002e656764656c77 0x0000000000000000 0x746f6e2073692065 0x0000000000000000 0x00000000006010b0 0x0000000000000000 0x6165726720656854 0x0000000000000000 0x00000000006010d0 0x0000000000000000 0x0000000000601110 0x0000000000000000 0x6e6f6973756c6c69 0x0000000000000000 0x0000000000000000 | 0x0000000000000021 0x00000000006010f0 0x0000000000000021 0x0000000000601130 0x0000000000000021 0x0020656874207369 0x0000000000000021 0x006764656c776f6e 0x0000000000000021 0x0000000000601010 0x0000000000000021 0x0000000000000000 0x0000000000000021 0x0061726f6e676920 0x0000000000000021 0x0000000000000000 0x0000000000000021 0x006e652074736574 0x0000000000000021 0x0000000000601090 0x0000000000000021 0x0000000000601030 0x0000000000000021 0x006f6e6b20666f20 0x0000000000020e81 0x0000000000000000 |
1.1) Draw the linked list (25 points)
Starting Address:
Value (in hex) | Next Address (in hex) |
Value (in hex) | Next Address (in hex) |
Value (in hex) | Next Address (in hex) |
Value (in hex) | Next Address (in hex) |
Value (in hex) | Next Address (in hex) |
Value (in hex) | Next Address (in hex) |
Value (in hex) | Next Address (in hex) |
Value (in hex) | Next Address (in hex) |
1.2) Determine the sentence being stored in the linked list. (15 points)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started