Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For each instance, give at least one example of a corner case that you should test for that function. int hash ( int base, char
For each instance, give at least one example of a corner case that you should test for that function.
int hashint base, char s takes an arbitrary integer and a nullterminated character
string, and returns an index into an array of length TABLESIZE. The precondition says that the
string is no longer than MAXSTRING bytes; the values of the bytes of the string are otherwise
unconstrained.
b int foochar sint limit maps a nullterminated C string to a bit integer in the
range to limit The string may be assumed to contain only printable ASCII characters, but
the length is not constrained.
c int processrecordt r int size, unsigned int serial The arguments are a non
NULL pointer to an array of type recordt the number of elements in the array, and a serial
number. The type recordt is defined as follows:
typedef struct
unsigned int quantity;
unsigned int serial;
char location;
Each record represents a part that is stored in a location. The return value is the number of
locations that have at least one item with the indicated serial number.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started