solution of question 8
[SET – 1]

User defined function in C++ named copyupper(), that reads the file FIRST.TXT and creates a new file named SECOND.TXT contains all words from the file FIRST.TXT in uppercase

 

void copyupper()
{
	ifstream fin;

	fin.open("FIRST.TXT");
	ofstream fout;
	fout.open("SECOND.TXT");
	char ch;
	while(!fin.eof())
	{
		fin.get(ch);
		ch=toupper(ch);
		fout<<ch;
	}
	fin.close();
	fout.close();
}