CHAPTER 3 Conditional Instruction
What us conditional instruction in c language ? CONDITIONAL INSTRUCTION Sometimes we want to watch comedy videos on Youtube if the day is Sunday Sometimes we order junk food if it is our friend’s birthday in the hostel You might want to buy an umbrella if its raining and you have the money you order the meal if dal or your favorite bhindi is listed on the menu. All these are decisions which depend on a condition being met. In c language too, we must be able to execute instructions on a condition being met. learn c programming Ques1 :-What are decision making instructions in c? Decision Making Instructions in C if-else statement switch statement Ques 2 : -What is if-else statement in c ? if-else statement The syntax of an if-else statement in C look like: if (condition to be checked) { statement-if-condition- true; } else{ statement-if-condition-false; ] code example:- int a= 23; if (a>18){ printf(”you can drive\n”); } Note that else block is ...