Now i came out with this simple code.
#include<stdio.h>
int main(void)
{
FILE *file, *file2;
file=fopen("1.txt", "rb");
file2=fopen("2.txt", "wb");
char c;
while ((c=fgetc(file))!=EOF)
{
fputc(c, file2);
}
fclose(file);
fclose(file2);
}
But its erasing the original content of 2.txt, i want it to keep it and write + it.Is there some sort of way to make the loop begin from the EOF ?


Sign In
Create Account


Back to top









