+ 1

What is background method of for loop in c language

Means that for(i=2;i<=5;i++), so consider i=1 then 2<=5 ,2++. So how is output 4

3rd Feb 2020, 2:15 PM
Omkar Sapkal
Omkar Sapkal - avatar
3 Réponses
+ 2
After initializing the value, the condition is checked. If the condition evaluates to true then the body of the loop is executed and then the value is incremented so that the next iteration takes place. But just in case if after initialization, your condition statement fails then the loop is terminated. https://www.sololearn.com/learn/C/2927/
3rd Feb 2020, 2:49 PM
Avinesh
Avinesh - avatar
+ 2
What do you mean by background method?
4th Feb 2020, 3:01 AM
Sonic
Sonic - avatar
+ 1
Thanks for the help
3rd Feb 2020, 2:51 PM
Omkar Sapkal
Omkar Sapkal - avatar