..
Free
|
|
|
|
|
Switch Case in C Language
The basic form of a switch statement is:
Another Example of Switch Case Program:
switch(
marks )
We also have a continue statement which is used with switch case. A continue statement causes a jump to the loop-continuation portion of the smallest enclosing iteration statement; that is, to the end of the loop body. Example of Continue Statement:
#include
<stdio.h> {
int
numb; {
getch(); In the C program above, when user enters any number less than 10 it prints it. For e.g say 5 it prints The number is 5. When number entered is greater than 10 say 12. Then its prints Error and again asks user to enter the number. The continue statement prints Error and jumps to the do while loop without terminating the loop and user is again asked to Enter any number. Difference between break and continue statements?
while (<expression>)
------------------------------------------------------------------
COPYRIGHT 2009 ALL RIGHTS RESERVED FREECPROGRAMS.COM |
|