Tech Mahindra interview question

Pattern printing in C language