It is supposed to write to a file..........
Code:#include<stdio.h> int main() { FILE *fp; char string[50]; fp=fopen("C:\\test.txt","w"); printf("\n\nEnter a few lines\n\n"); while(strlen(gets(string))>0) { fprintf(fp,string); fprintf(fp,"\n"); } getch(); }