C Programming Code Examples C > For Loops and While Loops Code Examples while loop statement in C programming language while loop statement in C programming language step1: The variable count is initialized with value 1 and then it has been tested for the condition. step2: If the condition returns true then the statements inside the body of while loop are executed else control comes out of the loop. step3: The value of count is incremented using ++ operator then it has been tested again for the loop condition. #include <stdio.h> int main() { int count=1; while (count <= 4) { printf("%d ", count); count++; } return 0; }