Pergunta de entrevista da empresa Texas Instruments

One basic DSA question and I was asked to do that question in C language. The question was that I was given a string, they ask me that if the string is like aabbc CC then give me the output like a 3 b3 C3