TATA ELXSI interview question

C program with different patterned output.