/*设顺序表中的关键字是递增有序的,将监视哨设在高下标端,设计算法实现简单顺序查找*/
#include "stdio.h"
#include "malloc.h"
#define LIST_SIZE 20
typedef struct{
charr[LIST_SIZE];
intlength; //length为表中元素的个数
}RecordList;
RecordList *SqLset(){ //建立顺序表
RecordList*L;
inti=0;char c;
L=(RecordList*)malloc(sizeof(RecordList));
scanf("%c",&c);//输入一个字符
L->length= 0;
while(c!='#'){
L->r[i]=c;
L->length++;
i++;
if(L->length== LIST_SIZE-1) break;
scanf("%c",&c);
}
return(L);
}
int SequenSearch(RecordLi