Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote