Question: 1 Purpose The high - level goal of this assignment is to help you build up a mental model of what is happening inside the

1 Purpose
The high-level goal of this assignment is to help you build up a mental model of what is happening inside the machine when your code is executed. You will gain experience with several key aspects of C and system programming:
Implementing a utility independent of any particular application progam (i.e., you will not write, and must not assume anything about the main program), and designing and implementing test cases for your implementation.
Using pointers in data structures, both in general and in storing string (character sequence) values.
Dynamic memory management, using malloc and free.
Separate compilation units.
2 Overview
A hash map (or hash table) is a data structure that stores key-value pairs. That is, the programming interface to the data structure provides two primary methods:
Bind a value (usually of a particular type) to a particular key, which is always a value of a particular type.
Get the value bound to a given key, if any.
Thus a hash map acts like an associative array. Many high-level programming languages offer similar data abstractions as a built-in facility; C does not. Names referring to such abstractions are "map", "dictionary" and "key-value store". Our implementation approach will yield (approximately) constant access time, provided the usage pattern satisfies certain assumptions.
For this assignment, the keys will be C strings (null-terminated arrays of char), and values will be of type void *. The latter type is used in C as a generic "container" for pointer values when their type
 1 Purpose The high-level goal of this assignment is to help

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 Databases Questions!