##if and if..else Statement##
The if
, if...else
and nested if...else
statement are used to make one-time decisions in C Programming, that is, to execute some code/s and ignore some code/s depending upon the test expression
if Statement:-
The
if
statement checks whether the text expression inside parenthesis () is true or not. If the test expression is true, statement/s inside the body of if
statement is executed but if test is false, statement/s inside body of if
is ignored.C if...else statement:-
The
if...else
statement is used if the programmer wants to execute some statement/s when the test expression is true and execute some other statement/s if the test expression is false.
Comments
Post a Comment