m5 - Lecture C5: Access Types Response to 'Muddiest Part of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Response to 'Muddiest Part of the Lecture Cards' (17 respondents) 1) Since arithmetic operations aren’t defined on pointers, what is the best way to increment through the pointers to a list? You keep track of the pointers by chaining the nodes together. 2) Are ListNode, List, .Head, and .Next already implemented in Ada? They are not predefined in the Ada language. The operations are defined in Linked_List.ads and Linked_List.adb 3) How would one keep track of all the pointers if removing them manually? You do not de-allocate the pointer. You de-allocate the node pointed to by the pointer. 4) Are we going to be dealing with circular lists? You should be able to extend the code for the singly linked list into a circular list, by making the last node point to the first node. 98 12 6 98 12 6 5) What does (IKL,5) imply? The my_record:= new contact’(“IKL”, 5) statement allocates a record from the heap and initializes the fields to IKL and 5. 6) How do you print an entire list?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

m5 - Lecture C5: Access Types Response to 'Muddiest Part of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online