IDNStudy.com, ang iyong gabay para sa maaasahan at mabilis na mga sagot. Sumali sa aming platform ng tanong at sagot upang makakuha ng eksaktong tugon sa lahat ng iyong mahahalagang tanong.
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.