Pergunta de entrevista da empresa Texas Instruments

Code how this pattern will form in C