Pergunta de entrevista da empresa CGI

In the coding round, we need to find the error count, which is a special character