Write a program to convert the text file contents to Upper-case & write the contents into another
file.
#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
int main()
{
ifstream in;
in.open("first.txt");
ofstream out;
out.open("second.txt");
char c;
while(!in.eof())
{
c=toupper(c);
out<<c;
}
in.close();
out.close();
return 0;
}
Comments
Leave a comment