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
'C' interview questions
'C' Interview Questions * Without using (;)semicolon print the message? Ans...
Logical Interview Questions
Logical Interview Questions ...
One dimensional array example 2
One dimensional array example /* program to calculate sum of 10 numbers in an array */ #inc...
switch statement program
Switch statement program #include<stdio.h> main() { in...
Logical Interview Questions2
Logical Interview Questions There are three boxes with fruits: one box with apples, one bo...
switch statement
Switch statement Switch is a keyword,it is used to create attractive interaction betwe...
program for fibonacci series
Program for Fibonacci series #include<stdio.h> main() { int a,b,c,i; clrscr(); a=0; b=1; printf("fibo...
Two dimensional array
Two dimensional Array Two dimensional array syntax ...
swapped 2 numbers without using 3 variable
Swapped 2 numbers without using 3 variable #include<stdio.h> main() { int a=10,b=20; ...
your tiny steps towards programming
Your tiny steps towards programming Programming Language is divided in to two types. > ...
0 comments:
Post a Comment