Question
yankee.txt is shown below: Yankee Doodle went to town riding on a pony Stuck a feather in his cap And called it macaroni. Write a
yankee.txt is shown below:
Yankee Doodle went to town riding on a pony Stuck a feather in his cap And called it macaroni.
Write a program in C to find an exact keyword (one that is expressed as a single word, starting and ending with a white-space character(either a space, tab, or newline)) in the given text file. Do not return words that are just containing the keyword as a substring. The output should print to screen: each line containing the keyword and its line number.
For example, if the keyword was "a" the output would be:
line 2: riding on a pony
line 3: Stuck a feather in his cap
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