This program takes the contents of a text file and copies them into another text file character by character.
FILE *fs, *ft;
printf(“Cannot open source file”);
prntf(“Cannot open target file”);
In this program file1.txt is a source file which is opened in read mode and file2.txt is a destination file which is opened in write mode.