有以下程序:
#include
main()
{ FILE *fp; int a[10]={1,2,3}, i, n;
fp = fopen("d1.dat", "w");
for (i=0; i<3; i++) fprintf(fp, "%d", a[i]);
fprintf(fp, "\n");
fclose(fp);
fp = fopen("d1.dat", "r");
fscanf(fp, "%d", &n);
fclose(fp);
printf("%d\n", n);
}
程序的运行结果是( )。
热度🔥579
解析:打开微信小程序查看本题解析