New tutorial on C loop statements published

Mandala loops
Image by Renate Anna Becker from Pixabay

There are four types of loop statements in C, for loops, while loops, do-while loops and goto statements. The first two are much more popular; In my Windows asteroids game, I used 54 for-loops, six while-loops, three do-while loops and no gotos.

I found the same thing in Delphi and Turbo Pascal. The only difference is that Pascal uses repeat .. until instead of do-while and I prefer repeat-until.  The logic is slightly clearer I feel as well. You repeat the body of the loop until a condition becomes true. In the C do-while statement, you repeat the body of the loop as long as the condition is true.

Anyway I’ve published tutorial eleven on C loop statements. Have fun. I’ll get it added to the tutorials page shortly..

(Visited 20 times, 2 visits today)