int a[4][5]={1,2,2,3,4,2,4,7,9,0,5,6,7,8,3,5,8,6,2,1 };
FILE * fout
int i,j;
fout = fopen("abc.txt "," w ");//打開文件,輸出文本文件。
for(j = 0;j & lt4;j++){
for(I = 0;我& lt5;i++){ fprintf(fout," %d ",a[j][I]);}//寫
fprintf(fout," \ n ");
}
fclose(fout);//關閉