In this program, we will take a string and substring as input and count occurrences of a substring in a string.
Steps to solve the program
- Take a string and substring as input.
- Count the occurrences of a substring in a string using count().
- Print the output.
Output :