这是一个二进制ASCII的输入,输出,程序如下:#include <stdio.h>#include <stdlib.h>int main(){ FILE *fp; char ch; int i; if ((fp=fopen("D:\\demo.bin","wb"))==NULL) { printf ("Failure to open demo.bin!\n"); exit(0); } for (i=0;i<128;i++) { fputc(i,fp); } fclose(fp); if ((fp=fopen("D:\\demo.bin","rb"))==NULL) { printf ("Failure to open demo.bin!\n"); exit(0); } while ((ch=fgetc(fp))!=EOF) { putchar(ch); } fclose(fp); return 0;}这个程序,应该可以满足你的要求。还有问题吗,谢谢采纳,Thanks♪(・ω・)ノ