c program oreder.c

Write the program "order.c" that implements the header file "order.h". Namely, do the following:

1- implement the function read_item.

2- implement the function read_order.

3- implement the function get_menu_item.

4- implement the function calc_total.

5- implement the function save_receipt.

6- implement the function main.

Note 1: All arrays must be allocated dynamically.

Note 2: Attach the file "order.c" as your answer.

Files: order.h , [login to view URL]

/* A pizzeria has the following menu

each item on the menu has an id, a description, and a price */

struct MenuItem{

int mi_id;

char mi_desc[100];

float mi_price;

} menu[10] = {

{113, "Small cheese pizza", 10.00},

{114, "Medium cheese pizza", 20.00},

{115, "Large cheese pizza", 30.00},

{123, "Small veggi pizza", 10.00},

{124, "Medium veggi pizza", 20.00},

{125, "Large veggi pizza", 30.00},

{311, "6pc chicken wings", 12.00},

{312, "12pc chicken wings", 20.00},

{411, "Garlic bread", 5.00},

{611, "Cola", 2.00}


/* An order item stores the item's id and quantity */

typedef struct Item{

int item_id;

int quantity;

} Item;

/* An order consistes of the name of the customer, number of

ordered items, array of ordered items, the value added tax

as a percentage to be applied to the total of the orders,

and a delivery fee to be added to total after applyint the

tax */

struct Order{

char customer_name[100];

int items_count;

Item* items;

float vat;

float delivery_fees;


/* read_item reads an order item information from the keyborad

and returns a pointer to the read item */

Item* read_item();

/* read_order reads all information of the order from the

keyboard and returns a pointer to the read order */

struct Order* read_order();

/* get_menu_item takes a menu item's id and returns a structure

contains all details about this item from the menu */

struct MenuItem get_menu_item(int id);

/* calc_total takes an order and returns the total amount that

should be paid by the customer for this order*/

float calc_total(struct Order* or);

/* save_receipt takes a file name fn and an order or and saves

the corresponding receitpt to the text file fn in the following


Welcome: Ahmad Ali


Item# Description Quantity Price


115 Large cheese pizza 2 30.00

124 Medium veggi pizza 2 20.00

411 Garlic bread 3 5.00

611 Cola 3 2.00


VAT: 0.05

Delivery fees: 10.00


Total: 137.05


void save_receipt(char* fn, struct Order* or);

/* main function reads an order from the keyboard and saves its receipt

to the file "[login to view URL]", you can use the text of the file "[login to view URL]"

as a test input */

int main();

Taidot: C++ -ohjelmointi, C-ohjelmointi, C# -ohjelmointi, Tietojärjestelmäarkkitehtuuri, PHP

Näytä lisää: c write integration test for my sample program, c# write integration test for my sample program, write some program in c language , Write an interactive program in C language to create an application program for your study centre. This application should be ha, write program in c++ -- 2, write program in c++, how to write a program in c language, how to write a program in c++, how to write a program in c++ pdf, how to write a sudoku program in c, how to write a database program in c++, unix read and write system calls sample program in c, write a program in c# to find the area of a square, how to write a computer program in c++, 4*4 matrix program in c, write a program in c# sharp to make such a pattern like a pyramid with an asterisk, how to write a program in c, write a simple calculator program in c, how to write program in c for pic microcontroller, c++ write a program that asks the user to enter the amount that he or she has budgeted for a month

Tietoa työnantajasta:
( 1 arvostelu ) riyadh, Saudi Arabia

Projektin tunnus: #29891225

7 freelanceria on tarjonnut keskimäärin $184 tähän työhön


Hi there,I'm biddin on your project "c program oreder.c" I have read your project description and i'm an expert in C programming and machine learning therefore i can do this project for you perfectly.I still have a few Lisää

$250 USD 5 päivässä
(99 arvostelua)

Hi there, I'm bidding on your project "c program oreder.c" Being an expert in C, and C++ programming I can do this project for you. please leave a message on my chat so we can discuss the budget and deadline of the pr Lisää

$250 USD 4 päivässä
(44 arvostelua)

###### Experienced in C, Python, Data structure, Algorithm Design and Analysis ######## Hi, Greetings. I am a computer engineer having masters in Mathematics, Computer Science and PhD in Computer Science. I have mor Lisää

$40 USD 2 päivässä
(38 arvostelua)

Hi, I just read your requirements and I can certainly deliver that. Just one thing, I am drawing up speed and performance optimization for your project and would like to know, do you have any particular security re Lisää

$250 USD 6 päivässä
(161 arvostelua)

✔️ Dear Client. I am seeing your repeated post. Being top-notch C/C++ programmer, I would like to work on your project. We can discuss more detail over chat. Thanks for reading my proposal.

$250 USD 1 päivässä
(4 arvostelua)

please discuss. Negotiable price and duration...........................................................................................................................................................

$45 USD 3 päivässä
(1 arvostelu)

I have 7 years experience in algorithm. I have a hackerranck perfil and i like too much to solve this type of problem.

$200 USD 3 päivässä
(0 arvostelua)