Hey guys! Now I will tell you about looping or iteration in C programming language.
Loops in C programming language is used to repeat block of code until the condition is false.
There are 3 types of loops in C programming :
1. for loop
2. while loop
3. do...while loop
Now, I will tell u about the loops.
For loop
For loop syntax :
for(initializations;test expression;update statment) {
body of loop;
}
While loop
While loop syntax :
while(text expression) {
body of loop;
update statement;
}
Do...while loop
Do...while loop syntax :
do {
body of loop;
}
while(text expression);
That's all for today! Have a great time with coding! ^^
No comments:
Post a Comment