Write a program that simulates the search-and-replace operation in a text editor. The program is to have only three function calls in main. The first unction prompts the user to type a string of less than 80 characters. It un prompts t e user to type the search substring of 10 or fewer characters. Finally, it prompts the user to type the replace substring of 10 or fewer characters.
The second call is the search-and-replace function, which replies all occurrences of the search substring with the replace substring and creates a new string. If ne occurrences are found, it returns the original string. Theoretically, the new string could be 800 characters long
(80 identical characters replaced by 10 characters each ). Your function must he able to handle overflow by using the realloc function to extend the new string when necessary. (Start with an output string
The post Write a program that simulates the search-and-replace appeared first on Assignment Freelancers.