求解C一道题!!
#include<stdio.h>main()
{
FILE *fp;int k,n,i,a[6]={1,2,3,4,5,6};
fp=fopen("d2.dat","w");
for(i=0;i<6;i++)
fprintf(fp,"%d\n",a[i]);
fclose(fp);
fp=fopen("d2.dat","r");
for(i=0;i<3;i++)//为什么这句加上了输出就是56,不加的就是12,求解~~
fscanf(fp,"%d%d",&k,&n);
printf("%d%d\n",k,n);
fclose(fp);
}