Lets write a C program to generate all combinations of 1, 2 and 3 using for loop. Related Read: For…