Define these functions... Players *add(Players *list, char *name) - Adds a new p
ID: 3687218 • Letter: D
Question
Define these functions...
Players *add(Players *list, char *name) - Adds a new player at start of list
void addItem(Players *list, char *p, char *item, int num) - Adds n items (item i) to player p, who might already have some of that item
int countPlayers(Players *list)- Returns the total number of players
int countItems(Players *list, char *name) - Returns the total items for player p
int numItems(Players *list, char *item) - Returns how many instances of item i exist (sum of that item for all players)
Players *orderedAdd(Players *list, char *name)- adds players in alphabetical order
void orderedAddItem(Players *list, char *p, char *item, int num)- adds items in alphabetical order
void gives(Players *list, char *p1, char *p2, char *item)- Player p1 gives all of his/her item i to player p2
Explanation / Answer
program :
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.