#include"stdio.h"
WORD[10][10]={"you","for,"your","on","no","if","the","in',"to","all"};
char xx[50][80];
int maxline=0;
int readdat();
void writedat();
woid writedat()
{
int i,j,k,tag;
char word[21],*p;
char str[80];
for(i=0;i<maxline;i++)
memset(str,0,80);
p=xx[i];
j=0;
memset(sord,0,21);
while(*p)
if(isalpha(*p)
word[j++]=*p++;
if(*p)continue;
}
tag=1;
for(k=0;k<10&&tag;k++)
if(stricmp(word,WORD[k]==0)tag=0;
if(tag)strcat(str,strrec(word));
j=0;
memset(word,0,21); 上面的都懂
while(*p&&(!isalpha(*p)))p++;〈—清问这一句是干什么用的????
}
strcpy(xx[i],str);
}
}
这道题石从文件上读出一组字符送到xx数组中
maxline是数组的行数;
它的题意是:删除行中的空格。标点以及与WORD数组相同的字符串,
余下的单词倒置后放入数组,