For Loop In C in C Language

Updated on May 31, 2025 | By Learnzy Academy

A for loop in C is a control structure that allows you to repeat a block of code a specific number of times. It is most useful when you know in advance how many times you want the loop to run.

for loop in C is a special feature in the language that helps you run the same piece of code again and again. It's called a control structure because it controls how your program flows — especially how many times something repeats.

This loop is most useful when you already know how many times you want to repeat the task. For example, if you want to print "Hello" 10 times, or check the first 10 numbers in a list, a for loop makes that very easy.

You just tell the loop:

  1. Where to start
  2. When to stop
  3. And how to change the value each time

Then the loop takes care of running your code that many times — no need to write it over and over!

Syntax:-

for (initialization; condition; increment) {
    // code to execute in each iteration
}
Click here to download practice questions on For Loop In C