(Solved) : Write Program Remove Extra Blanks Text Files Program Replace String Two Blanks One Single Q42745902 . . .

please using C++ language
Write a program to remove extra blanks from text files. Your program should replace any string of two or more blanks with oneWrite a program to remove extra blanks from text files. Your program should replace any string of two or more blanks with one single blank. It should work as follows: * Create a temporary file. * Copy from the input file to the temporary file, but do not copy extra blanks. * Copy the contents of the temporary file back into the original file. * Remove the temporary file. Your temporary file must have a different name than any existing file, so that no files other than the input file are changed. Your program should ask the user for the name of the file to be edited, but should not request a name for the temporary file. Instead, generate the name within the program. You can generate the temporary file using any strategy that is clear and efficient. For example, you could start with a name like TempX and check if that name already exists. If it doesn’t, you can use that name for the temporary file; if it does exist, append additional random letters to the filename until you find a name that isn’t already used. Show transcribed image text Write a program to remove extra blanks from text files. Your program should replace any string of two or more blanks with one single blank. It should work as follows: * Create a temporary file. * Copy from the input file to the temporary file, but do not copy extra blanks. * Copy the contents of the temporary file back into the original file. * Remove the temporary file. Your temporary file must have a different name than any existing file, so that no files other than the input file are changed. Your program should ask the user for the name of the file to be edited, but should not request a name for the temporary file. Instead, generate the name within the program. You can generate the temporary file using any strategy that is clear and efficient. For example, you could start with a name like TempX and check if that name already exists. If it doesn’t, you can use that name for the temporary file; if it does exist, append additional random letters to the filename until you find a name that isn’t already used.

Expert Answer


Answer to Write a program to remove extra blanks from text files. Your program should replace any string of two or more blanks wit…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?