Posts

Showing posts from February, 2020

Control Statements | IF Statements | Switch Statement | Examples

Image
Control Statements  These are those statement which controls the flow of program control. They transfer the control of program to another part of program conditionally or unconditionally. There are several control statements in the C Programming which are being discussed below - If Statement  If statement evaluates the condition inside the parentheses. if the condition is true then statement inside the if body are executed and if the condition is evaluated to false then statements inside the body of if are skipped. Syntax :  if(condition)                 {                     Statements;                  } Flow Chart :  If-If Statement  This is used to check multiple conditions for a particular problem. Syntax :       if(condition)       {           statement 1;        }       if(condition)       {           statement 2;       } Flow Chart : If-Else Statement  This statement is used with the keyword else. if condition ev