When a for loop runs the second time does the loop return to the for statement or to one line above the for statement? | Sololearn: Learn to code for FREE!
Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcję
0

When a for loop runs the second time does the loop return to the for statement or to one line above the for statement?

What line does loop return to after first iteration?

20th Jun 2018, 5:59 PM
LottoMan
1 Odpowiedź
+ 1
1. int i; 2. for(i=0;i<5;i++) { 3. cout<<i; 4. } After the loop ends on line 4, it will return to line 2 until the condition i<5 is made true.
20th Jun 2018, 6:02 PM
Sachin Artani
Sachin Artani - avatar