(2) ;
strcat(t,p1+1);
strcat(t," ");
}
strcpy(xx[i],t);
}
}
void main()
{
if( (3) ){
printf("數(shù)據(jù)文件in.dat不能打開(kāi)!\n\007");
return;
}
StrOL();
writeDat();
getch();
}
int ReadDat(void)
{
FILE*fp;
int i=0;
char*p;
if((fp=fopen("e:\\a\\in.dat","r"))==NULL)return 1;
while(fgets(xx[i],80,fp)!=NULL){
p=strchr(xx[i],′\n′);
if(p)*p=0;
i++;
}
maxline= (4)
fclose(fp);
return 0;
}
void WriteDat(void)
{
FILE*fp;
int i;
fp=fopen("e:\\a\\out6.dat","w");
> for(i=0;i< (5) ;i++){
printf("%s\n",xx[i]);
fprintf(fp,"%s\n",xx[i]);
}
fclose(fp);
}
【答案】
(1)isalpha(*p1)&&p1!=xx[i]
(2)*p2=0
(3)ReadDat()
(4)i
(5)maxline
相關(guān)推薦:
計(jì)算機(jī)軟考程序員備考:程序設(shè)計(jì)知識(shí)點(diǎn)匯總 2010年計(jì)算機(jī)軟件水平考試時(shí)間安排通知