/character by charecter adding./
#include<conio.h>
void add()
{
FILE *p;
p=fopen("asd.txt","a");
char c;
c=gatchar();
while(c!=EOF)
{
fputc(c,p);
c=getchar();
}
fclose(p);
}
void main()
{
FILE *p;
add();
p=fopen("asd.txt","w+");
c=fgetc(p);
while(!feof(p))
{
printf("%c",c);
c=fgetc(p);
}
fclose(p);
getch();
}