
Dynamic Memory Allocation and Linked List 623
Enter an integer from the entered numbers for Search : 4
Found ! Position of integer 4 is 4
16.7 PREDECESSOR AND SUCCESSOR
In the list of elements, for any location n, (n-1) is the
predecessor and (n+1)is successor. In other words,
for any location n in the list the left element is a pre-
decessor and the right element is a successor. One can
find predecessor and successors of an element in the
list. The first element of a list does not have a prede-
cessor and last does not have a successor.
Figure 16.3 shows the predecessor and suc-
cessor elements of number 10.
The following program displays ...