XII-CS-A PROG TO CONCAT GIVEN TWO TEXT FILE AND SAVE IN A THIRD FILE

#include<conio.h>
#include<stdio.h>
#include<fstream.h>
#include<iostream.h>
#include<string.h>
int main()
{
//clrscr();
cout<<"\n..... A PROG TO CONCAT GIVEN TWO TEXT FILE AND SAVE IN A THIRD FILE....\n";  
char c;
ifstream fin1("abc1.txt");
ifstream fin2("abc2.txt");
ofstream fout1("abc3.txt");
cout<<"\n .. Content of file 1 is ..\n";
while(fin1)
{
c=fin1.get();
fout1<<c; cout<<c;
}
cout<<"\n .. Content of file 2 is ...\n";
while(fin2)
{
c=fin2.get();
fout1<<c; cout<<c;
}
fin2.close();
fin1.close();
fout1.close();
cout<<"\n\n  concatenated file 3 is...\n ";
ifstream f1("abc3.txt");
while(f1)
{
c=f1.get();
cout<<c;
}
f1.close();
getch();
}

Popular posts from this blog

XII- CS-- SOLVED SQL queries (SQL PRACTICAL ASSIGNMENS)

SQL--HOME ASSIGNMENTS(XII Class)

Python-MySQL Connectivity