if statement:
Here,
Ø First condition is
evaluated. It produces either TRUE or
FALSE.
Ø If the condition is true,
then the Block statements will be executed and then the control reaches to next
statements.
Ø If the condition is false,
then the compiler skip by the Block-I statements and then it reaches to next
statements.
Example
Program:
void main()
{
int a=5,b=6,c;
c = a + b ;
if (c==11)
{
printf("Execute me
1");
}
printf("Execute me 2");
getch();
}
No comments:
Post a Comment