Question: Part 3. You will add three more commands: dmp, which dumps the entire dictionary on the output, ldf, which loads a file containing dictionary entries,

  • Part 3. You will add three more commands: dmp, which dumps the entire dictionary on the output, ldf, which loads a file containing dictionary entries, and svf, which saves the current dictionary in a file. Also, in Part 3, the executable will be taking files as argument, and load them.

MAIN.C

Part 3. You will add three more commands: dmp, which dumps the

#include #include #include #include "dict.h" #define error(args. . .) do { fprintf (stderr, args); exit (1); } while (0) char* readline (FILE* f) ; int main (int argc, char** argv) { dict_t* dict = dict_create ( ); dict_destroy (dict); #define BUFLEN 1024 char* readline (FILE* f) { char* buf = NULL; size_t alloc_len = 0; ssize_t pos = -1; while (1) { int c = fgetc (f) ; if (c == EOF) return buf; ++pos; 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!