Exercise 12: Write a function defined as int charcnt (const char s[], int

Exercise 12:
Write a function defined as
int charcnt (const char s[], int length, char c)
that counts the number of times the character given as c occurs in the array s which contains length
characters.
Let the main program call this function with a number of test cases. Don’t forget to try difficult cases
like c not being found at all, s having the length of zero etc.
Exercise 13:
Change the program from exercise 9 so that the counting is done in a function. Let the main program
test this function with a number of relevant cases, including extreme ones.
(latest change at 2010-09-06, 09.20)