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
One dimensional array example 2
One dimensional array example /* program to calculate sum of 10 numbers in an array */ #inc...
Check prime number up to 100
C heck prime number up to 100 :- #include<stdio.h> main() { int n,i,count; for(n = 1;n<=100;n++) { count = 0; for(i=2;i...
check addresses are correct or not
/* cosider 3 variables and find the addresses ,first two variables addresses difference is equal to another two variables ...
a program for do-while loop
A program for do-while loop syntax :- { ...
string functions
Strings are used in string handling operations such as, Counting the length of a string. Comparing two strings. Copyin...
Temperature Conversion
Temperature Conversion #include<stdio.h> main() { ...
Conditions of the variables
Conditions of the Variables Condition is a comparison between variables. Conditions are divided i...
String functions programs
Program for comparison between two strings :- #include<stdio.h> #include<string.h> main() ...
string examples
#include<string.h> main() { char arr1[9]={'w','e','l','','c','o','m',...
Constants of "c"
CONSTANTS Definition :- a number represent...
0 comments:
Post a Comment