Online Learning
CLICK HERE TO ORDER YOUR ASSIGNMENT

Use c++Convert the contents of a text file to upper case

Perform the following

Question

use c++

Convert the contents of a text file to upper case.

Perform the following

operations:

  • Read the console input and build a file. [‘$’ character denotes end of content in file.]
  • Close the file after creation.
  • Now convert the contents of the file to upper case.
  • Display the contents of the updated file.

Input:

Music is like a dream.

Without music, life would be a mistake

I can chase you, and I can catch you, but there is nothing I can do to make you mine.

Music gives a soul to the universe,

wings to the mind,

flight to the imagination and life to everything.

$

where,

  • ‘$’ character denotes end of content in file.

Output:

MUSIC IS LIKE A DREAM.

WITHOUT MUSIC, LIFE WOULD BE A MISTAKE

I CAN CHASE YOU, AND I CAN CATCH YOU, BUT THERE IS NOTHING I CAN DO TO MAKE YOU MINE.

MUSIC GIVES A SOUL TO THE UNIVERSE,

WINGS TO THE MIND,

FLIGHT TO THE IMAGINATION AND LIFE TO EVERYTHING.

gut -o FileUpper FileUpper . cpp
./FileUpper
Enter the data here :
this is line 1
this is line 2
this is some other line
Updated text :
THIS IS LINE 1
THIS IS LINE 2
THIS IS SOME OTHER LINE
Engineering Technology

Use c++Convert the contents of a text file to upper case