Introduction
C Programming
C Advanced
Important C Programs
Modal Box
Tutorials
C is a very powerful and widely used language. It is used in many scientific programming situations. It forms (or is the basis for) the core of the modern languages Java and C++. It allows you access to the bare bones of your computer.C++ is used for operating systems, games, embedded software, autonomous cars and medical technology, as well as many other applications. Don't forget to visit this section...
For Loop
In for loop, the first part begins with variable’s initialization, followed by the condition and increment/decrement operation on the variable.
The first part (initialization) and the last part (increment/decrement) may not be present, but the semicolon is there.
Syntax for For loop
for(initialization; condition; increment/decrement)
{
// body statement to be executed
}
Examples :
Print no's from 1 to 100
#include <stdio.h> #include <conio.h> void main() {
int i; for(i=1;i<=100;i++) { printf("%d ",i); }
}
Infinite for loop
for( ; ; )
{
}
Video/ C Introduction
Watch video in full size