内部代码:
typedef struct
{
KeyType key; /*KeyType为关键字的数据类型*/
InfoType data; /*其他数据*/
} NodeType;
typedef NodeType SeqList[MAXL]; /*顺序表类型*/
int SeqSearch(SeqList R,int n,KeyType k) /*顺序查找算法*/
{
int i=0;
while (i<n && R[i].key!=k)
{
printf("%d ",R[i].key);
i++; /*从表头往后找*/
}