Question: 7. (a) Using only pointer arithmetic, write a function int uniqCount (char *s), that counts and returns the number of unique characters in the null-terminated

7. (a) Using only pointer arithmetic, write a function int uniqCount (char *s), that counts and returns the number of unique characters in the null-terminated string pointed to by the character pointer s. You cannot use array indexing in your solution. (b) Using pointer arithmetic, write a function int *uniqCount (char *s), where the character pointer points to a null-terminated string and the function returns an integer pointer that points to a dynamically allocated array of integers containing the frequency of each unique character in the order they appear in the string. (You can use the function defined in 7(a). You cannot use array indexing or additional arrays in your solution.) 7. (a) Using only pointer arithmetic, write a function int uniqCount (char *s), that counts and returns the number of unique characters in the null-terminated string pointed to by the character pointer s. You cannot use array indexing in your solution. (b) Using pointer arithmetic, write a function int *uniqCount (char *s), where the character pointer points to a null-terminated string and the function returns an integer pointer that points to a dynamically allocated array of integers containing the frequency of each unique character in the order they appear in the string. (You can use the function defined in 7(a). You cannot use array indexing or additional arrays in your solution.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
