#include int main(){ char s[100]; FILE *fp; gets(s); if((fp=fopen("test.txt","w"))!=NULL) { fputs(s,fp); fclose(fp); } return 0;}