Skip to content
Snippets Groups Projects
Select Git revision
  • main default protected
1 result

main.c

Blame
  • main.c 476 B
    #include "hm.h"
    #include <stdio.h>
    
    int main() {
        char key[80], value[80];
        hm h;
        hm_init(&h, 5);
        for (int i = 0; i < 6; ++i) {
            scanf("%s", key);
            scanf("%s", value);
            hm_set(&h, key, value);
            hm_print(h);
            if (hm_search(h, "orestis")) {
                printf("orestis found.\n");
            }
            if (hm_remove(&h, "orestis", value)) {
                printf("orestis removed: %s.\n", value);
            }
        }
        hm_destroy(&h);
    }