Cognizant interview question

Star pattern triangle problems in C