If statements in C language in Details
-> One or more condition may be given within if.
-> If the condition is true , control enters inside the scope of if and execute the statement given there.
-> After executing then control comes to the next line of the scope of if.
->If condition is false then control directly comes to the next line of the scope of if.
->If a single statement is assoociated with if then defining the scope of if using
{
}
is optional beacuse by default the next line of if is treated as its scope.
-> if multiple statement are associated with if then defining the scope of if using
{
}
becomes compulsary .
Categories: c programming c programming