1. Program to read content from one file and write it to another file.
#include <iostream.h>
#include <fstream.h>
#include<conio.h>
int main() {
ifstream fin("input.txt");
ofstream fout("output.txt");
char ch;
cout<<"content of 'input.txt' file is: \n";
while (fin.get(ch)) {
fout << ch;
cout<<ch;
}
cout<<endl;
fin.close();
fout.close();
cout << "File copied successfully!" << endl;
getch();
return 0;
}