柠檬试题库
search
首页 计算机 公务员 驾照 关于

有以下程序 #include main() { FILE *fp; int a[10]={1,2,3,0,0}, i; fp = fopen("d2.dat", "wb"); fwrite(a, sizeof(int), 5, fp); fwrite(a, sizeof(int), 5, fp); fclose(fp); fp = fopen("d2.dat", "rb"); fread(a, sizeof(int), 10, fp); fclose(fp); for (i=0; i<10; i++) printf("%d,", a[i]); } 程序的运行结果是


  • A.1,2,3,0,0,0,0,0,0,0,
  • B.1,2,3,1,2,3,0,0,0,0,
  • C.123,0,0,0,0,123,0,0,0,0,
  • D.1,2,3,0,0,1,2,3,0,0,
热度🔥338
计算机二级office题库App
收录最新试题,随时随地刷题
参考答案:D
解析:打开微信小程序查看本题解析