| COS 126 Exercise Set 6  | Answers | 
These programming exercises are intended help review the material on recursion, pointers, and dynamic memory allocation. Do not turn in solutions.
itoa: char *itoa(int n, int
b) returns a dynamically allocated null-terminated string giving the
character representation of n in base b. The caller
must deallocate the returned string. For example:
char *s = itoa(875, 5);
printf("%s\n", s);Prints 12001 and deallocates
s.Try to implement these programs before looking at the suggested solutions.