1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| int main() { sequenlist sl={{1,2,3,4,5,6,7,8,9,10},9}; sequenlist *L; L=&sl; printf("original:\n"); print(L); printf("length:\n"); printf("%d\n",length(L)); printf("reverse:\n"); reverse(L); print(L); printf("delete position two:\n"); Delete(L,2); print(L); printf("inser position two and add data is eight:\n"); insert(L,8,2); print(L); printf("purge:\n"); purge(L); print(L); printf("eight locate:\n"); printf("%d",locate(L,8)); return 0; }
|