Write a C++ program to remove unnecessary blanks from a text file. Your program should read the text file and copy it to
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write a C++ program to remove unnecessary blanks from a text file. Your program should read the text file and copy it to
Write a C++ program to remove unnecessary blanks from a textfile. Your program should read the text file and copy it to anothertext file, but whenever more than one blank occurs consecutively,only one blank should be copied to the second file. The second fileshould be identical to the first file, except that all consecutiveblanks have been replaced by a single blank. If the input file e.g.looked like this: What a beautiful day! I wish I was at the beach…The output file should look like this: What a beautiful day! I wishI was at the beach… NB: First plan your program on paper (usingyour computational thinking to do so). You have to submit your planfor your program as well as the actual program code, input andoutput files. Planning your program can take the form of aflowchart, pseudocode, or notes to guide you in the development ofthe program.