Selection structure : Control Structures « Statement « C Tutorial






The sequence of the instruction is determined by the condition.

The statements in this category are if and switch.

# include<stdio.h>
main(){
    int i=0, j =1;
   
    if (i > j){
        i = i + 1;
        printf("a");
    }
    else{
        printf("b");
        j = j +1;
    }
}
b








6.1.Control Structures
6.1.1.Control Structures
6.1.2.Selection structure