How would you write a program in c that can display files and give information a
ID: 675196 • Letter: H
Question
How would you write a program in c that can display files and give information about their contents.
Prompt the user for one of four options:
m: print this menu
c: cat a text file
i: get information about a text file
q: quit If the user chooses to get information or to cat a file, you will need to prompt for the filename.
Filename: If the user chooses to get information, the program will say how many lines are in the file, how many non-empty lines are in the file, and how many times “LUC” (any mix of upper and lower case) occurs.
For the following three-line data file:
My dog Lucky
is a plucky ducky!
This output would be produced:
Lines: 3 Non-empty: 2 Lucs: 2
Explanation / Answer
Smaple programe to read the PNG image
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.