Pergunta de entrevista da empresa EchoStar

Given C code sample and correct if needed.