break Statement in C

The break statement is used to break the execution of body of loop. When this statement is encountered, the control is directly transferred to the statement immediately after the loop body. break is also used in switch-case statement to transfer the control of execution from the statements of some case to the statement immediately after … Read more

for Statement in C

The for loop is an entry-controlled loop (like while) in which first the condition is checked, and if it is True then the statements are executed. However, if the condition is False, the control will be transferred to the statement immediately after the body of loop. The condition can be any constant, variable or expression … Read more

while Statement in C

The while-loop is an entry-controlled loop in which first the condition is checked, and if it is True then the statements are executed. However, if the condition is False, the control is transferred to the statement immediately after the body of loop. The condition can be any constant, variable or expression that evaluates to True … Read more

switch case Statement in C

switch case statement is another control flow decision making statement supported by C programming language. The general syntax of switch case is as follows; switch ( expression ) { case value1: statement1; break; case value2: statement2; break; . . . case valuen: statementn; break; default: statementx; } The switch case construct first evaluates the expression … Read more

if…else if Ladder in C

if…else if ladder is another extension of if statement supported by C programming language. if statement checks a single condition and if True executes one single statement (simple or compound). if else statement also checks a single condition, however it executes one of the two statements (both of which can be simple or compound). Sometimes, … Read more

if Statement in C

if statement is one of the basic and primitive decision making statement supported by C language. The general syntax of if statement is as follows: if ( condition ) statement; This flow control construct first checks the condition and if it evaluates to True then executes the statement. The condition can be any expression that … Read more

Types of Flow Control Statements in C

In general, C language supports 2 types of flow control statements: 1. Decision Making 2. Looping Decision Making statements are those statements which execute a set of other statements if and only some condition is true. In contrast, Looping statements execute a specific set of statements multiple times as long as some condition is true. … Read more