control statements till now we know that the code in the program is executed sequentially from the first line of the program to its last line that isthe second statement is executed after the firstthe third statement is executed after the secondso on and so forth although this is truein some cases we want only selected statements to be executed control flow statements enable programmers to conditionally execute particular block of code there are three types of control statementsdecision control (branching)iterative (looping)and jump statements while branching means deciding what actions have to be takenloopingon the other handdecides how many times the action has to be taken jump statements transfer control from one point to another point decision control statements supports decision control statements that can alter the flow of sequence of instructions these statements help to jump from one part of the program to another depending on whether particular condition is satisfied or not these decision control statements include(aif statement(bif-else statement(dswitch-case statement (cif-else-if statementand if statement if statement is the simplest decision control statement that is frequently used in decision making the general form of simple if statement is shown in fig syntax of if statement if (test expressionstatement statement nstatement xtest expression false true statement block statement figure if statement construct the if block may include statement or statements enclosed within curly brackets first the test expression is evaluated if the test expression is truethe statements of the if block are executedotherwise these statements will be skipped and the execution will jump to statement the statement in an if block is any valid language statementand the test expression is any valid language expression that evaluates to either true or false in addition to simple relational expressionswe can also use compound expressions formed using logical operators note that there is no semi-colon after the test expression this is because the condition and statement should be put together as single statement