PlayStation interview question

Program to count occurrence of a given character in a string.