Your code has a bug in it which your professor must have missed, shame on
If you pass a string where the first character is the max character, your
will miss it!
Try this - here I've saved the first character of the string before
char maxChar(char *s)
if(*s == '\0')
max = *s;
c = maxChar(++s);
The reasoning behind this algorithm is as follows. Take the first character
the string and pass the remaining characters to maxChar recursively.
the results, choose the max and return that. If a string is empty, then 0
is the max