A04 Memory Diagram
Draw a memory diagram of the following code fragment. Use a rectangle for each memory location
that is allocated. Label each allocation with its type, name, and value, if known. Use arrows to
indicate contents that point to known locations, and use ? if the value is unknown. Show all
memory allocated and in which memory segment it is allocated in. Submit the memory diagram
to Gradescope.
```
1 int array3[3] = {1,2,3};
2 int array2[2] = {4,5};
3 int array1 [1] = {6};
4 int *arrays[] = {array3, array2, array1};
```
STACK
HEAP
DATA
CODE