资源描述:
《c语言链表操作演示程序》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、#include#include#include#include#definekey_Down0x5000#definekey_Up0x4800#definekey_Esc0x011b#definekey_Right0x4d00#definekey_Left0x4b00#definekey_Enter0x1c0d#definekey_Alt_O0x1800#definekey_Alt_T0x1400#definekey_Alt_E0x1200#definekey_Alt_F0x2100voidstru
2、(void);voidcreat(void);voidtravel(void);voidinit(void);voidlian(void);voidguide(int);voidtguide(int);voiddelete(void);voiddguide(int);voidinsert(void);voidmovey(void);voidchange(void);voidArray(int);voidarray(int);voidinguide(int);voidinverted(void);main(){inti,j,key,x,y,l;char*menu[]={"On
3、e","Er","Three","Four"};char*red[]={"O","E","T","F"};char*f1[]={"Thestructure","Creatalist","Travelthelist","Quit"};char*f2[]={"Removeallnodes","Insertnode","Removethespecialnode","Quit"};char*f3[]={"Exchangethespecialnode","Returnaspecialnode'svalue","Changeaspecialnode'svalue","Quit"};ch
4、ar*f4[]={"Quicksort","Invertedlist","Quit"};charbuf[29*7*2],buf1[29*2];printf("Thisprogramproviddesthefellowingknowlege:");printf("1.Thestructuret2.Creatalistt3.Travelthelist");printf("4.Removeallnodest5.Insertnodet6.Removethespecialnode");printf("7.Exchangethespecialnodet8.Retu
5、rnaspecialnode'svalue");printf("9.Changeaspecialnode'svaluet10.Quicksortt11.Invertedlist");printf("Ifyouwanttoviewaknowledge,pleaseinputthesreialnumberbeforetheknowledge");printf("Theserialnumber=");scanf("%d",&i);switch(i){case1:case2:case3:printf("YoucanfindinthefileOne");break
6、;case4:case5:case6:printf("YoucanfindinthefileEr");break;case7:case8:case9:printf("YoucanfindinthefileThree");break;case10:case11:printf("YoucanfindinthefileFour");break;}getch();LOOP:while(1){textbackground(BLUE);clrscr();textmode(C80);window(1,1,80,1);textbackground(LIGHTGRAY);textcolor(
7、BLACK);clrscr();gotoxy(13,1);for(i=0,l=0;i<4;i++){x=wherex();y=wherey();cprintf("%s",menu[i]);l=strlen(menu[i]);gotoxy(x,y);textcolor(RED);cprintf("%s",red[i]);x=x+l+13;gotoxy(x,y);textcolor(BLACK);}gotoxy(13,1);key=bioskey(0);switch(key){casekey_Alt_O:{LOOP1: