Skip to main content


Showing posts from May 12, 2020

Conditional Statements In C Programming

Conditional Statements: What are conditional Statements: Ans. Conditional statements are those statements which are used to check whether a particular condition is true or t is false and if it is true the task given to it gets executed. Types of conditional statements: There 3 types of conditional statements if statement else if statement else statement They all work together to give the desired output. Syntax: if(condition here) {code to be written here;} Note: The condition which needs to be checked should be written inside the round brackets. Code which needs to be executed if the condition is true is written inside curly braces. Semicolon will come only inside curly braces and not after condition. 1. if statement: It is the main statement and it is a standalone statement i.e it doesn't require any other conditional statement for its existence. Syntax: if(condition) {Code to be written here;} If the condition in the