//………Program on FileOpen.cpp………..//
#include
#include
using namespace std;
int main()
{
ofstream out;
out.open("Departments");
out<<"INFORMATION TECHNOLOGY\n";
out<<"MECHANICAL\n";
out<<"CHEMICAL\n";
out.close();
out.open("Intake");
out<<"60\n";
out<<"90\n";
out<<"30\n";
out.close();
const int SIZE=100;
char line[SIZE];
ifstream in;
in.open("Departments");
cout<<"\nList of Departments:\n";
while(in)
{
in.getline(line,SIZE);
cout<
}
in.close();
in.open("Intake");
cout<<"\nMaximum intake list:\n";
while(in)
{
in.getline(line,SIZE);
cout<
}
in.close();
return(0);
}
Copyright © 2011 - All Rights Reserved - Softron.in
Template by Softron Technology