Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. (40 pts) Design a C program to find the number of times the string bear appears in an input text file that contains only
3. (40 pts) Design a C program to find the number of times the string "bear" appears in an input text file that contains only words. Capital and lower case letters are considered to be the same, such as the word "Bear" or "bear" are the same as the word "bear". Display the number of occurrences on the screen. Example: Input file: The beaker and the bear are greybEArDs. The word "bear" appears three times. b) The program should count if the number of vowels and consonants of the text. [ 10 points out of the 40 points for the exercise ] Input: The Ethernet is popular. Nr of vowels: 8; Nr of consonants: 12. Use comments in your code to explain your solution. Make sure your explanations work for any input file, not just for the examples above
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started