Page 97 - DCAP407_DATA_STRUCTURE
P. 97
Data Structure
3. Select a suitable choice for every question.
(a) Which of the following field holds the address of next element?
(i) Data field (ii) Node field (iii) Link field (iv) Address field
(b) Which of the following value is assigned to the last node to depict the end of a list?
(i) Address of middle node (ii) NULL
(iii) Address of first node (iv) Address of previous node
(c) Which of the following list is also known as a two-way list?
(i) Singly-linked list (ii) Circular linked list
(iii) Doubly-linked list (iv) Header list
(d) Which of the following node is referred to as a dummy node in a linked list?
(i) Head node (ii) Circular node (iii) End node (iv) First node
5.7 Review Questions
1. “Linked lists are useful when the number of elements to be stored in a list is indefinite.” Discuss.
2. “Linked lists require additional storage for references as they use pointers. This makes linked lists
impractical for those lists that store data of Character or Boolean types.” Discuss.
3. “Doubly-linked lists are more advantageous than singly-linked lists.” Discuss.
4. “Dynamic arrays can be used instead of linked lists.” Analyze.
5. “Circular linked lists are better than linear lists. “Comment.
6. “Linked lists allow only sequential access to elements. Whereas, arrays allow random access to its
elements”. Analyze.
Answers: Self Assessment
1. (a) False (b) False (c) True (d) True (e) True
2. (a) Empty list or null list (b) Doubly linked list (c) Circular singly-linked list
(d) Linked list
3. (a) Link field (b) Loss of data (c) NULL
(d) Doubly-linked list (e) Head node
5.8 Further Readings
Lipschutz, S. (2011). Data Structures with C. Delhi: Tata McGraw Hill.
Reddy, P. (1999). Data Structures Using C. Bangalore: Sri Nandi Publications.
http://www.scribd.com/doc/26312970/39/REPRESENTATION-OF-LINKED-LIST
http://cslibrary.stanford.edu/103/LinkedListBasics.pdf
90 LOVELY PROFESSIONAL UNIVERSITY