• C language

    Basic for Loop In C

    for loop consists of three parts in a sequence. Initialization: Use to initialize the loop variable. Condition: It is checked after each iteration as an entry point to the loop. Increment or Decrement: Incrementing or Decrementing the loop variable to eventually terminate the loop not satisfying the loop condition. Remember that the loop condition checks the conditional statement before it loops again. Syntax: for(initialization, condition, incrementation or decrementation) { code statements; } Example is give below #include<stdio.h> #include<conio.h> void main() { //Always declare the variables before using them int i = 0; // declaration and initialization at the same time…