(Occurrences of a specified character) Rewrite the count function in Programming Exercise to find the number of occurrences of a specified character in a C-string using the following header:
int count(const char s[], char a)
Write a test program that reads a string and a character and displays the number of occurrences of the character in the string. The sample run is the same as in Programming Exercise.
Programming Exercise (Occurrences of a specified character) Write a function that finds the number of occurrences of a specified character in the string using the following header:
int count(const string& s, char a)
For example, count("Welcome", 'e') returns 2. Write a test program that reads a string and a character and displays the number of occurrences of the character in the string. Here is a sample run of the program:

We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.