How to print the Floyd’s triangle in C? Explain with examples

This is also one of the basic interview questions for the freshers.

This is a right-angled triangular array of natural numbers, used in computer science education.

This  Floyd’s triangle is defined by filling the rows of the triangle with consecutive numbers, starting with a 1 in the top left corner

Here is the example program to print the Floyd’s triangle in C.

The output of the above program is