Home C Programming Language C Control Flow

C Control Flow

if Statement - if statement is used when a unit of code need to be executed by a condition true or false.

if-else Statement - In case you want to use both condition of if statement, you can use if-else statement.

if-else-if Statement - If we want to use several conditions we can use if-else-if statement

switch Statement - The switch statement allows you to select from multiple choices based on a set of fixed values for a given expression

while Loop statement - The while loop is used when you want to execute a block of statements repeatedly with checked condition before making an interation.

for Loop Statement - C for loop statement is usually used to execute code block for a specified number of times.

do-while Loop Statement - do while loop statement allows you to execute code block in loop body at least one.

break and continue Statements - break statement is used to break any type of loop such as while, do while an for loop. break statement terminates the loop body immediately. continue statement is used to break current iteration.