#include<stdio.h>
int main()
{
FILE *src, *dest;
int ch;
src = fopen("code.c", "r");
dest = fopen("output.txt", "w");
if(src != NULL)
{
while((ch = fgetc(src)) != EOF)
{
fputc(ch, dest);
}
printf("Data copied from source folder to destined folder\n");
printf("Please open and check the destined file\n");
fclose(dest);
fclose(src);
}
return 0;
}
No Comments