Question: 3. Please write a recursive function int strchar (char str(1, char ch) which will return the number of occurrences of the ch in the str.
3. Please write a recursive function int strchar (char str(1, char ch) which will return the number of occurrences of the ch in the str. For example, strchar("abac", 'a') will return 2. Please also write a main function which will call strchar and print return value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
