Sale!

910 LAB Parsing food data Given a text file containing the availability of food items write a

Original price was: $10.00.Current price is: $5.00.

-50%

Download button will appear immediately after successful payment.

Full support will be provided with necessary files installation.

Get impeccable customized solution within 24 hours, hassle-free.

(3 customer reviews)

Free worldwide shipping on all orders over $50

  • 30 days easy returns
  • Order yours before 2.30pm for same day dispatch
Guaranteed Safe Checkout

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
910 LAB Parsing food data Given a text file containing the availability of food items write a
$10.00 Original price was: $10.00.$5.00Current price is: $5.00.

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