Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

5. The following memory addresses represent a linked list of characters in alpha

ID: 3909880 • Letter: 5

Question

5. The following memory addresses represent a linked list of characters in alphabetical order. Following each character is a pointer to the next data item, and the end of the list is denoted by a pointer value of zero. What is the value of the corresponding head pointer? __

Address (in hex):

20

21

22

23

24

25

26

27

28

29

Contents:

'R'

22

'W'

26

'E'

20

'Z'

0

'C'

24

6. Define values for the pointers only (below, now empty) so that they represent a linked list of characters in alphabetical order. Denote the end of the list by a pointer value of zero.

Address (in hex):

20

21

22

23

24

25

26

27

28

29

Contents:

'U'

'D'

'B'

'M'

'H'

Address (in hex):

20

21

22

23

24

25

26

27

28

29

Contents:

'R'

22

'W'

26

'E'

20

'Z'

0

'C'

24

Explanation / Answer

5.

The list is in alphabetical order. So it must start with element 'C'.

So head pointer is 28.

The elements in the linked list is C->E->R->W->Z

6.

The linked list in alphabetical order B-> D->H->M->U

The head pointer is 24

Do ask if any doubt. please upvote.

Address (in hex): 20 21 22 23 24 25 26 27 28 29 Contents: 'U' 0 'D' 28 'B' 22 'M' 20 'H' 26
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote