<prompt> Andika kazi katika C kuhesabu idadi ya matukio ya kamba ndani ya kamba ndefu.  <response>: Here is a C function that counts the number of occurrences of a string inside a longer string: cinclude include using namespace std;int countStringOccurrencesstring source, string search int count 0; int pos source.findsearch, 0; find the first occurrence of the search string while pos ! string::npos count; increment the count pos source.findsearch, pos 1; find the next occurrence starting from the previous position 1 return count; You can use the function like this: cint main string source I love AI. AI is awesome.; string search AI; cout search occurred countStringOccurrencessource, search times in the source string. endl; Output: AI occurred 2 times in the source string. return 0; 