- 论坛徽章:
- 0
|
请大家指教,谢谢
哈哈,这是我现在的最新答案,但还是达不到我要的效果为什么呢?
#include "stdio.h"
#include "stdlib.h"
main()
{
FILE *fp1,*fp2;
int b[5];
int a[72];
char i,j;
if((fp1=fopen("d:\\mcutest\\tc\\fu\\file3.txt","r"))==NULL)
{
cputs("can not open the file\n");
fclose(fp1);
}
puts(fp1);
putchar(i)==fp1;
fp2=fopen("d:\\mcutest\\tc\\fu\\file4.txt","w");
while(fgets(a,72,fp1)!=NULL)
switch(isalpha(i))
{
case '0':printf("%c is not a char\n",i);
break;
default:printf("%c ifs a char\n",j);
break;
}
for(i=0;i<72;i++)
{
for(j=0;j<5;j++)
{
printf("%c",a);
}
}
if(printf("%-5c",fp1))
printf("%d");
else printf("\n");
fclose(fp2);
return;
} |
|