C in 100 Seconds: For Loops — Init Condition Step | Episode 8
1views
002:17
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
The for loop packs init, condition, and step into one line. i starts at one, runs while it's five or less, and adds one after each pass.
Five iterations, five numbers.
Nest two for loops and you get a grid — an outer loop for rows, an inner loop for columns. For every row, the column loop runs all the way
through before the next row starts. Init, condition, step — compact and predictable.
Student code: https://github.com/GoCelesteAI/c-in-100-seconds/tree/main/episode08
What You'll Learn:
• for (init; condition; step) — all three in one line
• Basic counting loop — 1 through 5
• Nested for loops — building a 3x3 grid
• Inner loop completes fully before outer loop advances
Next: Episode 9 — Functions
#c #programming #100seconds #learnc #forloop #nestedloops #iteration #grid #tutorial
Tags
c for loop, nested for loop c, iteration c, for init condition step, c tutorial 2026, c beginner, 100 seconds, learn c, coding tutorial
Tags
c for loopnested for loop citeration cfor init condition stepc tutorial 2026c beginner100 secondslearn ccoding tutorial