codeGK
Code it ALL
C While Loop - CodeGK
♦ C While Loop

♣ About While Loop in C

While Loop iterates over a condition untill the given condition is true.
Below is the representation of While Loop Syntax.
Basic Syntax
while (Expression) { // statements inside the body of the loop }
Syntax Explanation:
// statements inside the body of the loop : code block goes here Expression: logical expression which outputs boolean(true or false) value

♣ Example1: While Loop in C

In this example, Iterating over the condition in While Loop.
Example
Input:
Output:
Prev_LessonNext_Lesson
C While Loop