我.txt档如果有一笔数字资料
00
01
10
11
我把00 01 10 11存成c1~c4
我要怎么改变内容0变a 1变b
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
FILE *fPtr;
char c1[20], c2[20], c3[20], c4[20], c5[20], c6[20], c7[20], c8[20], c9[20], c10[20];
fPtr = fopen("t1.txt", "r");
if (!fPtr) {
printf("档案开启失败...\n");
exit(1);
}
fscanf(fPtr, "%s%s%s%s%s%s%s%s%s%s", c1, c2, c3, c4, c5, c6, c7, c8, c9, c10);
fclose(fPtr);
printf("\"%s\"\n\"%s\"\n", c1,c2);
}
有人可以给我点提示吗?