C programming

Tuesday, January 13, 2009

#include #include void main() { clrscr(); char s,str1[50],str2[50]; printf("Enter a file name:"); gets(str1); printf("Enter out put file:"); gets(str2); FILE *fp,*fo; fp=freopen(str1,"r",stdin); fo=freopen(str2,"w",stdout); while((s=getc(fp))!=EOF) { putc(s,fo); } fclose(fp); fclose(fo); // printf(" fghgd"); //if((fopen(str2,"r"))==0) // printf("File is copied succsesfully: "); // else // printf("File is not copied succsesfully: "); */ // getch(); }

0 comments:

Visitors

PlugIn.ws - Free Hit Counter, Web Site Statistics, Traffic Analysis

  © Blogger template Leaving by Ourblogtemplates.com 2008

Back to TOP