Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need a basic program in C using the following instructions: In main.c Build the ItemToPurchase struct with the following specifications Data members char itemName
I need a basic program in C using the following instructions:
In main.c Build the ItemToPurchase struct with the following specifications Data members char itemName [I int itemPrice int itemQuantity and create two functions MakeltemBlank0 Has a pass by reference ItemToPurchase parameter. Reference Figure 7.4.1. o Sets item's name 'none', item's price = 0, item's quantity = 0 PrintltemCost0 o Has a pass by value ItemToPurchase parameter. Ex. of PrintltemCost0 output: Bottled Water 10 @ $1 $10 (2) In main0, prompt the user for two items and create two objects of the Item ToPurchase struct. Before prompting for the second item, enter fflush(stdin), to allow the user to input a new string. Ex: Item 1 Enter the item name: Chocolate Chips Enter the item price:3 Enter the item quantity: 1 Item 2 name: Bottled w Enter the item price: 1 Enter the item quantity: 10Step 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