/*Just an example of break statmenrt.*/
#include <stdio.h>
#include <conio.h>
int main()
{
int val;
for(val = 1 ; val <=10 ; val++)
{
if (val == 5)
{
break;
}
printf("%d ",val);
}
getche();
return 0;
}
/*Output will be the counting from 1 to
4.*/
No comments:
Post a Comment