#include<stdio.h> int main() { FILE *p; char s[9999]; memset(s,0,9999); p=fopen("a.txt","r"); if(p){ \x09fread(s,1,9999,p); \x09puts(s); \x09fclose(p); } memset(s,0,9999); fread(s,1,9999,stdin); p=fopen("a.txt","w"); fputs(s,p); fclose(p); return 0; }
Note that non-ascii characters in the above source code will be escaped (such as \x9f).