Question: You will start by giving a definition for your main structure struct dict. (You cannot change the name of this type, it is however aliased

You will start by giving a definition for your main structure struct dict. (You cannot change the name of this type, it is however aliased (typedef'd) in dict . has dict_t to avoid having to type struct each time.) For instance, you may want to have a dictionary implemented as a linked list; in that case, you can store the head of that list and its length in your structure: struct dict { struct dict list* head; size t size; The first field is a pointer (*) to the head of the list, that is, its memory address. The struct dict_list itself contains the key, the value, and the address of the next element in the list: struct dict list { char* key; char* val; struct dict lists next; The end of the list is signaled by having next be NULL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
