Worksheet Runtime Storage

Table of Contents

1 Questions and Completion

To receive credit for completing the worksheet, you must complete the corresponding quiz (it is just a checkbox) on D2L when you have finished the worksheet.

If you have questions as you go through this worksheet, please feel free to post them on the discussion forum.

2 Dangling Pointers

Write two dangling pointer examples of your own design.

The first should involve a dangling pointer that points into the stack. It should return the "wrong" value when the dangling pointer is read, i.e., the area of memory pointed to by the dangling pointer should be overwritten by the time the dangling pointer is read.

The second should involve a dangling pointer that points into the heap.

Feel free to post your solutions to the discussion forum.

3 Solutions

Author: James Riely

Created: 2021-07-21 Wed 13:16

Emacs 25.3.50.1 (Org mode 8.2.10)

Validate