1.

Write a program to count number of occurrence of a given charcter in string

Answer»

Given a STRING and a character, task is to MAKE a function which count occurrence of the given character in the string.
Examples:
Input : str = "geeksforgeeks" c = 'e' Output : 4 'e' appears four times in str. Input : str = "abccdefgaa" c = 'a' Output : 3 'a' appears THREE times in str.
PLEASE PLEASE PLEASE MARK ME BRAINILIST



Discussion

No Comment Found