#include #include void main() { FILE *fp,*cp; char ch[50]; clrscr(); fp=fopen("g:\\guest\\lekh.txt","r"); cp=fopen("g:\\guest\\summer.txt","a"); if(fp==NULL||cp==NULL) { printf("cannot open the file"); exit(); } while(!feof(fp)) { fscanf(fp,"%s",ch); fprintf(cp,"%s ",ch); printf("%s ",ch); } fprintf(cp,"\n"); fclose(fp); fclose(cp); getch(); }
|
| Author: Lenin 05 Jun 2008 | Member Level: Diamond Points : 2 |
interesting article , buddy , continue to contribute more. wishing gud future in ISC . Always honesty pays Think different WINNERS DO NOT DO DIFFERENT THINGS, BUT THEY DO THINGS DIFFERENTLY Always encourage the new mwmbers ..that is the energydrink for them ..me too
|