Write a procedure str_ncmp
to mimic the C function strncmp
. The parameters passed to this function are the same as those of str_ncpy
. It should compare at most the first num
characters of the two strings and return a positive, negative, or 0 value like the str_cmp
procedure does.