>>894
ありがとうございます。
/*
cat -n 1.txt
>x
*/

FILE *fp;
fp=fopen("1.txt","w")
fprintf(fp,"%d\n",1);


これですかね。