Mega Code Archive
Categories
/
C
/
Code Snippets
Reopen a file
#include
int main(void) { char str[100]; freopen("OUTPUT", "w", stdout); printf("Enter a string: "); gets(str); printf(str); return 0; }