Help writing simple code with array

Please help me complete the code for this task. Thank you !

4. Write a function that receives a string and a letter as parameters and returns the number of characters in the string that is equal to the letter informed.
Example: string = "arara" letter sought 'a' function should return 3.
closed account (jwkNwA7f)
We won't do your homework. You need to do it yourself, and when you encounter a problem, we can help you with that.

If you are having trouble understanding arrays, you can look at this:
First go look up some functions for working with strings.

Then find out the basics of how to initialize a char array.

If you still can't figure it out, type out your code and we will help.
Topic archived. No new replies allowed.