C-sources:
1 #include2 int main() 3 { 4 FILE* fp; //定义一个文件 5 6 fp = fopen("p5.txt","r"); 7 8 if(fp == NULL) 9 {10 printf("ERROR!\N");11 return;12 }13 14 int TwoPointSignal[1000];15 16 17 int n,k=0,j;18 19 while(!feof(fp))20 {21 fscanf(fp,"%d",&n);22 TwoPointSignal[k]=n;23 k++;24 }25 26 fclose(fp);27 28 for(j=0;j<15;j++)29 {30 printf("%d\t",TwoPointSignal[j]);31 if(j%8==0)32 printf("\n");33 }34 35 return 0;36 }
p5.txt:
结果图: