正在加载图片...
下面给出的C函数其作用是对带头结点的单向循环链 表中的记录进行顺序查找 truct node f ink key; char ch; struct node *next j typedef struct node node; void segsrch(h, k) NODE *h: int k INODE*p; p=h->next; while(pl=h) fif(p->key==k) printf(“成功%d%c”,p>key,p>ch); return;} else p=p->next; printf(“表中无此记录n”)下面给出的C函数其作用是对带头结点的单向循环链 表中的记录进行顺序查找. struct node { ink key; char ch; struct node *next } typedef struct node NODE; void seqsrch(h,k) NODE *h; int k; { NODE *p; p=h->next; while(p!=h) { if(p->key==k) { printf(“成功.%d%c”, p->key, p->ch); return; } else p=p->next; } printf(“表中无此记录\n”); }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有