Description
9.10 LAB: Parsing food data
Given a text file containing the availability of food items, write a program that reads the information from the text file and outputs the available food items.
The program first reads the name of the text file from the user. The program then reads the text file, stores the information into the four string arrays predefined in the program, and outputs the available food items in the following format: name (category) – description
Assume the text file contains the category, name, description, and availability of at least one food item, separated by a tab character (‘t’).
Hints: Use the fgets() function to read each line of the input text file. When extracting texts between the tab characters, copy the texts character-by-character until a tab character is reached. A string always ends with a null character (10).
Ex: If the input of the program is: food.txt
Brian Duke –
Thanks a lots, I really appreciate your effort it is an excellent report.
Glenn Mccall –
I really love the quality of the assignments. They are great so far. Accurate.
Miles Mawby –
Great Work In Timely Fashion. Something what I wanted.