You are tasked to develop a program in C that finds how many times a word is used in a given statement. To test your program, you should hardcode the below sample statement in your code and ask the user to input two different words, which are “UCF” and “KNIGHTS.” Your program should not be case sensitive, it should correctly find the words regardless of how the user inputs the words, and your code should work for any words with less than 10 characters.
You are tasked to develop a
Sample Statement:
UCF, its athletic program, and the university's alumni and sports fans are sometimes jointly referred to as the UCF Nation, and are represented by the mascot Knightro. The Knight was chosen as the university mascot in 1970 by student election. The Knights of Pegasus was a submission put forth by students, staff, and faculty, who wished to replace UCF's original mascot, the Citronaut, which was a mix between an orange and an astronaut. The Knights were also chosen over Vincent the Vulture, which was a popular unofficial mascot among students at the time. In 1994, Knightro debuted as the Knights official athletic mascot.
Sample Output:
Please input first word: Knight (or KnIGhT, knight, ...)
Please input second word: UCF (or ucf, UcF, ...)
KNIGHT: 6
UCF: 3
KNIGHT: ######
UCF: ###
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images