函数:
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#define MaxLen 9 //单词的最大长度
#define Radix 27 //基数rd为27,分别对应' ','a',…'z'
typedef char String[MaxLen+1]; //定义String为字符数组类型
typedef struct node
{
String word;
struct node *next;
} LinkNode;
void DispWord(String R[],int n) //输出单词
{
int i;
printf(" ");
for (i=0; i<n; i++)
printf("[%s] ",R[i]);
printf("\n");
}
void PreProcess(String R[],int n)
//对单词进行预处理,用空格填充尾部至MaxLen长
{
int i,j;
for (i=0; i<n; i++)
{
if (strlen(R[i])<MaxLen)
{
for (j=strlen(R[i]); j<MaxLen; j++)
R[i][j]=' ';
R[i][j]='\0';
}
}
}
void EndProcess(String R[],int n)
//恢复处理,删除预处理时填充的尾部空格
{
int i,j;