The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 2 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Write a computer program which asks the user the enter 4 C-strings: f ileN ame1,f ileN ame2, word1, and word2. Your program should open the file whose name isf ileN ame1 as an input file (assuming it exits), find all the occurrences of the stringword1 in the this file, and create a new file named f ileN ame2 with all the occurrencesof word1 replaced with word2.Example: assume that f ileN ame1 = “input.txt′′, f ileN ame2 = “output.txt′′, word1 =“ile“, word2 = “IeL“, and assume that the file “input.txt” consists of the text:Write a computer program which asks the user the enter 4C-strings: fileName1, fileName2, word1, and word2.Your program should open the file whose name is fileName1as an input file (assuming it exits), find all the occurrencesof the string word1 in the this file, and create a new filenamed fileName2 with all the occurrences of word1 replacedwith word2.Then your program is supposed to create a file called “output.txt” and store in itWrite a computer program which asks the user the enter 4C-strings: fIeLName1, fIeLName2, word1, and word2.Your program should open the fIeL whose name is fIeLName1as an input fIeL (assuming it exits), find all the occurrencesof the string word1 in the this fIeL, and create a new fIeLnamed fIeLName2 with all the occurrences of word1 replacedwith word2.