In this article,Looping Control Structures are explained in detail with examples.
These control structures are used to execute a block of statements continuously/iteratively based on a condition.
1.While loopThese control structures are used to execute a block of statements continuously/iteratively based on a condition.
It is also known as pre-test loop i.e. first, we check the condition and if it is true, then it executes
the body.
Syntaxinitialization;
while(condition)
{
-----
body;
----
increment/decrement;
}