Texas Instruments interview question

Code how this pattern will form in C