The “for” keyword is used to declare a for-loop. A for-loop is a loop that is specified to run a certain amount of times.

Below is the C program to demonstrate a for-loop: 


#include <stdio.h>
int main()
{
  for (int i = 0; i < 5; i++) 
  {
    printf("%d ", i);
  }
  return 0;
}

Output
0 1 2 3 4