The general syntax for WHILE loop is given as:
initialise loop counter ;
while ( test loop counter using a condition )
{
do this ;
and this;
increment loop counter;
}
Some view points about WHILE loop:
- The statements aural the while bend would accumulate on accepting accomplished till the action getting activated charcoal true.When the action becomes false, the ascendancy passes to the aboriginal account that follows the physique of the while loop. than the action there can be any added accurate expression. As continued as the announcement evaluates to a non-zero amount the statements aural the bend would get executed.
- The action getting activated may use relational or analytic operators.
- As a aphorism the while have to analysis a action that will finallybecome false, contrarily the bend would be accomplished forever.
- Even floating point bend counters can be decremented. Once again the accession and cutback could be by any value, not necessarily one.
Thursday
//
Labels:
C LANGUAGE
//
0
comments
//
0 comments to "THE WHILE LOOP"
Powered by Blogger.
Blog Archive
-
▼
2011
(50)
-
▼
July
(38)
- INTRODUCTION TO C
- DATA SETS IN C
- DATA TYPES
- VARIABLES
- SIMPLE C PROGRAM
- PROGRAM USING SCANF() AND PRINTF()
- C INSTRUCTIONS
- INTRODUCTION TO DECISION CONTROL STRUCTURES
- IF STATEMENT
- IF STATEMENT PROGRAM
- IF ELSE STATEMENT
- NESTED IF ELSE
- DETERMINING ROOTS OF AN EQUATION
- ELSE IF STATEMENT
- LOGICAL AND ARITHMETIC OPERATORS
- CONDITIONAL OPERATORS
- LOOPS
- THE WHILE LOOP
- The for bend specify things about a bend in a ind...
- EXAMPLE OF FOR LOOP
- NESTING OF LOOPS
- THE ODD LOOP
- THE DO-WHILE LOOP
- BREAK STATEMENT IN C
- THE CONTINUE STATEMENT IN C
- SWITCH STATEMENT IN C
- SIMPLE PROGRAM SHOWING SWITCH STATEMENT
- THE GOTO STATEMENT IN C LANGUAGE
- FUNCTIONS IN C LANGUAGE
- CALLING FUNCTIONS IN C LANGUAGE
- CALL BY REFERENCE IN C LANGUAGE
- POINTERS IN C LANGUAGE
- SIMPLE PROGRAM SHOWING POINTER IN C LANGUAGE
- PROGRAM FOR FUNCTION CALL BY REFERENCE IN C
- SWAPPING OF TWO NUMBERS IN C
- RECURSION IN C LANGUAGE
- FACTORIAL OF A NUMBER WITHOUT RECURSION IN C
- ARRAYS IN C LANGUAGE
-
▼
July
(38)

Post a Comment