7 // A simple restaurant structure 9 typedef struct { 8. 10 char restaurant_name [15]; double rating; char city[31]; unsigned short opening_year; } RESTAURANT_t, *RESTAURANT; 11 12 13 14 15 16 17 //...


C LANGUAGE.


According to the instructions, the function will be written.Please don't refuse the question, it's clear.


7<br>// A simple restaurant structure<br>9 typedef struct<br>{<br>8.<br>10<br>char restaurant_name [15];<br>double rating;<br>char city[31];<br>unsigned short opening_year;<br>} RESTAURANT_t, *RESTAURANT;<br>11<br>12<br>13<br>14<br>15<br>16<br>17 // Arraylist structure<br>18 typedef struct ArrayList_s<br>19 {<br>20<br>void **list;<br>int size;<br>int capacity;<br>int delta_capacity;<br>21<br>22<br>23<br>24 } ArrayList_t, *ArrayList;<br>25<br>26<br>27 void update_restaurants(ArrayList 1, char *restaurant_name,<br>double rating)<br>28<br>{<br>29<br>/**<br>30<br>* Function: update_restaurants<br>31<br>* This function updates the ratings of the restaurants with the given<br>* name in the array list.<br>32<br>33<br>34<br>* @param 1An array list of restaurants<br>* @param restaurant_name Name of the restaurants to be updated<br>* @param rating New rating for the restaurants<br>*/<br>35<br>36<br>37<br>38<br>39 }<br>40<br>

Extracted text: 7 // A simple restaurant structure 9 typedef struct { 8. 10 char restaurant_name [15]; double rating; char city[31]; unsigned short opening_year; } RESTAURANT_t, *RESTAURANT; 11 12 13 14 15 16 17 // Arraylist structure 18 typedef struct ArrayList_s 19 { 20 void **list; int size; int capacity; int delta_capacity; 21 22 23 24 } ArrayList_t, *ArrayList; 25 26 27 void update_restaurants(ArrayList 1, char *restaurant_name, double rating) 28 { 29 /** 30 * Function: update_restaurants 31 * This function updates the ratings of the restaurants with the given * name in the array list. 32 33 34 * @param 1An array list of restaurants * @param restaurant_name Name of the restaurants to be updated * @param rating New rating for the restaurants */ 35 36 37 38 39 } 40

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here