IDNStudy.com, ang platform na nag-uugnay ng mga eksperto at kuryusidad. Ang aming mga eksperto ay nagbibigay ng mabilis at eksaktong sagot upang tulungan kang maunawaan at malutas ang anumang problema.
Please check the attached file for the solution code.
The program logic is as follows:
We prepare 3 character buffers to be used as strings. One string for the the input string, and the second for the pattern string. The third string is a capitalized version of the second string.
After the buffers are initialized, we prepare a loop for searching the pattern string inside the input string. We also count the number of occurence. We continue until there are no more occurence of the pattern string.