EASY 2 LEARN 'C'
Home
DotNet
Tuesday, 28 August 2012
program for while loop
Program for while loop
syntax
:-
while(condition)
{
statements;
incrementation/decrementation;
}
Example for printing 1 to 10
:-
#include<stdio.h>
main()
{
int i=1;
clrscr();
while(i<=10)
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
Logical Interview Questions2
Logical Interview Questions There are three boxes with fruits: one box with apples, one bo...
'C' interview questions
'C' Interview Questions * Without using (;)semicolon print the message? Ans...
Logical Interview Questions
Logical Interview Questions ...
your tiny steps towards programming
Your tiny steps towards programming Programming Language is divided in to two types. > ...
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...
program for even/odd number
Program for even/odd Number #include<stdio.h> main() { int a; ...
nested if-else condition
Nested if-else Condition It is used for comparision between more than two varia...
Approaches and Algorithm of 'C'
Approaches of 'C' Language :- These are 4 types. * Procedural Language. * Logical...
switch statement
Switch statement Switch is a keyword,it is used to create attractive interaction betwe...
0 comments:
Post a Comment