Domanda di colloquio di Sony

Given a string "aabbccc" write a program that displays how many times each character appears