Pergunta de entrevista da empresa Revolut

Duplicate character in a String one c program find the error