Hello Dear,
Please Tell Me How do you count the occurrence of a given character in a string ?
Hello Dear,
Please Tell Me How do you count the occurrence of a given character in a string ?
Program to count occurrence of a given character in a string. 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.
Bookmarks