1.In “nested if” control statement, if condition 1 is false, then condition 2 is checked and statements are executed if it is true.
If condition 2 also gets failure, then else part is executed.
For Example-:
#include<stdio.h> void main() { int a,b,c; printf("enter the no"); scanf("%d%d%d",&a,&b,&c); if(a>b) { if(a>c) { printf("a is gretest"); } else { printf("c is gretest"); } } if(b>c) { printf("b is gretest"); } else { printf("c is gretest"); } }