Pergunta de entrevista da empresa Qualcomm

Find the error with the following c code and correct them