Question: Write a C program that prompt the user to enter a string of their choosing. Output the string Enter a sentence or phrase: read a
Write a C program that prompt the user to enter a string of their choosing. Output the string "Enter a sentence or phrase:" read a character string of less than character. Then searches the "text.txt file and save the result in a file named "results.txt The "results.txt file should have the following outputs:
The string you entered, with prepend "You entered:
The number of times the phrase was find in the "text.txt file with prepend "Number of Times Phrase Found:
The Original Text where all the instances of the phrase are turned to all capital"
Exampletexttxt contents:
This is a Test of my Program to see if my program works.
If my program does not work I will be very sad as
the programs are supposed to work.
I can ask ChatGPT to write me a Program.
Do you think the ChatGPT program would work?
ssSSSSSsssSS
Example Input phrase:
ChatGPT
Exampleresultstxt contents:
You entered: ChatGPT
This is a Test of my Program to see if my program works.
If my program does not work I will be very sad as
the programs are supposed to work.
I can ask CHATGPT to write me a Program.
Do you think the CHATGPT program would work?
sSSSSSSSSSS
Number of Times Phrase Found:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
