while syntax c code example
Example 1: do-while in c
#include <stdio.h>
int main()
{
int j=0;
do
{
printf("Value of variable j is: %d\n", j);
j++;
}while (j<=3);
return 0;
}
Example 2: whiel loop in C
while (testExpression)
{
// statements inside the body of the loop
}