include stdio.h
include list.c
void
PrintList const List L
Position PHeader L ;
if IsEmpty L
printf Empty listn ;
else
do
PAdvance P ;
printf d , Retrieve P;
while !IsLast P, L;
printf n ;
main
List L;
Position P;
int i;
LMakeEmpty NULL ;
PHeader L ;
PrintList L ;
for i0; i10; i
Insert i, L, P ;
PrintList L ;
PAdvance P ;
for i0; i10; i 2
Delete i, L ;
for i0; i10; i
ifi20Find i, L! NULL
printf Find failsn ;
printf Finished deletionsn ;
PrintList L ;
DeleteList L ;
return 0;
Reviews
There are no reviews yet.