Question: Reference for Dict Lab : A Serious Introduction to C: http://reed.cs.depaul.edu/lperkovic/csc406/homeworks/Dictlab.html Two files that you will be modifying are main.c and dict.c main.c : #include

Reference for Dict Lab : A Serious Introduction to C:

http://reed.cs.depaul.edu/lperkovic/csc406/homeworks/Dictlab.html

Two files that you will be modifying are main.c and dict.c

main.c :

Reference for Dict Lab : A Serious Introduction to C:http://reed.cs.depaul.edu/lperkovic/csc406/homeworks/Dictlab.htmlTwo files thatyou will be modifying are main.c and dict.cmain.c : #include #include W

#include #include W N #include "dict.h" 4 5 typedef struct dict_list { 6 char* key; char* val; 8 struct dict_list* next; 9 } dict_list_t; 10 11 typedef struct dict { 12 dict_list_t* head; 13 size_t size; 14 } dict_t; 15 16 17 dict_t* dict_create ( ) { 18 return NULL; 19 20 21 void dict_put (dict_t* dict, const char* key, const char* val) { 22 } 23 24 char* dict_get (const dict_t* dict, const char* key) 25 return NULL; 26 27 28 void dict_del (dict_t* dict, const char* key) { 29 } 30 31 size_t dict_size (const dict_t* dict) { 32 return Ou; 33 34 35 void dict_clear (dict_t* dict) { 36 37 38 void dict_destroy (dict_t* dict) { 39 40 41 void dict_apply (const dict_t* dict, const dict_apply_fun_t fun, void* arg) { 42 } 43main.c - dictlab [SSH: aspen.com.depaul.edu] W #include #include #include #include "dict.h" #define error(args. . .) do { fprintf (stderr, args); exit (1); } while (0) 9 10 11 char* readline (FILE* f) ; 12 13 int main (int argc, char** argv) { 14 dict_t* dict = dict_create (); 15 dict_destroy (dict); 16 17 18 #define BUFLEN 1024 19 20 char* readline (FILE* f) { 21 char* buf = NULL; 22 size_t alloc_len = 0; 23 ssize_t pos = -1; 24 25 while (1) { 26 int c = fgetc (f); 27 28 if (c == EOF) 29 return buf; 30 ++pos; 31 if (alloc_len

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!