Conditional Control structure ,Short Questions, Computer Science
Chapter # 4 Conditional Control structure SHORT QUESTIONS Question 1. What is control statement? Ans: A control statement is an instruction which determine the sequence of execution of other statements. In other words, it controls the flow of execution of program of program statements. Question 1. What is conditional statement? Ans : A conditional statement is an instruction in a programming language that contains a condition. When a conditional statement is executed, first the condition is evaluated then based on the result (True or False) a particular statement or a set of statements is executed. Conditional statements of c language are : if, if-else, else-if and switch statements. Question 3. Explain the syntax and purpose of if statement with the help of a computer program? Ans : The if statement has the following general form. if(condition) { Block of statements } When this statement is executed the condition is evaluated. If the co...