-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.c
More file actions
31 lines (31 loc) · 990 Bytes
/
Copy pathtest.c
File metadata and controls
31 lines (31 loc) · 990 Bytes
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
27
28
29
30
31
#include<stdio.h>
#include<stdlib.h>
#include"seqlist.h"
int main(int argc,const char *argv[])
{
int i=0;
seqlist_t*L=NULL;
L=create_seqlist();
for(i=0;i<=4;i++)
insert_seqlist(L,i,0);
printf("seqlist L length is %d\n",get_length_seqlist(L));
show_seqlist(L);
puts("*******************************************************");
puts("search data =3");
printf("data = 3 pos is %d\n",search_seqlist(L,3));
printf("seqlist L length is %d\n",get_length_seqlist(L));
show_seqlist(L);
puts("*******************************************************");
puts("delete data=3");
delete_seqlist(L,search_seqlist(L,3));
printf("seqlist L length is %d\n",get_length_seqlist(L));
show_seqlist(L);
puts("*******************************************************");
puts("change data[2]=99");
change_seqlist(L,99,2);
printf("seqlist L length is %d\n",get_length_seqlist(L));
show_seqlist(L);
puts("*******************************************************");
clear_seqlist(L);
return 0;
}