EASY 2 LEARN 'C'
Home
DotNet
Tuesday, 28 August 2012
a program for "for loop"
A Program for "for loop"
Syntax
:-
{
for( initialization;condition;incrementation/
decrementation)
statements;
}
Example
:-
#include<stdio.h>
main()
{
int i;
clrscr();
for(i=1;i<=10;i++)
printf("%d\n",i)
getch();
}
output
:-
1
2
3
4
5
6
7
8
9
10
0 comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Search Box
'C' Language
'C' Programming
(27)
Arrays in 'C'
(5)
Interview Que's about 'C'
(8)
Strings in 'C'
(4)
Popular Posts
0 comments:
Post a Comment