The break keyword helps terminate a loop as demonstrated in this example.
This example demonstrates the use of Goto Label (though it is not considered a good coding practice to use goto).
This example demonstrates a do-while loop.
A DO-WHILE loop is similar to a while loop, except that a DO-WHILE loop is guaranteed to execute at least one time.
This example demonstrates a while loop.
A while loop statement repeatedly executes a target statement/block of statements as long as the given condition is true.
This example demonstrates the For loop.
The initialization step:
It is executed first, and only once. This step allows you to declare and initialize any loop control variables.
This example demonstrates string comparison.
strcmp(string1, string2);
Compares string1 and string2 and returns one of the following integers (useful for alphabetical order):
This program will find whether a given number is perfect or not. A perfect number is that in which we get the same result if we multiply the digits of the number or we add the digits of the number.