Please Write C Regarding Following Linked Lists Typedef Struct Orderlist Foodnode Head Poi Q37022096

Please write this in C. Regarding the following linked lists: typedef struct _orderList{ foodNode *head; // Pointer to first food item for the order (alphabetical) int count; // Number of food items in the order} orderList;

Where foodNode is defined as

typedef struct _foodNode{ char *data; // Food Item Name struct _foodNode *next;} foodNode;

You will provide the following functions to operate onorderLists:

orderList *createItem(). Creates (usingdmalloc() — see below) an instance of an orderList struct,initializes its fields and returns a pointer to the newly allocatedstruct.

int insert(char *str, orderList *s). Places a

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.