C – continue statement

In C programming, the continue statement works like a break statement, instead of terminating the loop the continue statement skips the code in between and pass it to the next iteration in the loop. continue statement Flowchart: Syntax of continue statement: In the for loop, continue statement skips the test condition and increment value of … Read more

C – break statement

break statement in C is mostly used in a switch statement to terminate the cases present in switch statement. It terminates the loop and transfers the execution process immediately to statement following the loop. The use of break statement in nested loops terminates the inner loop and the control is transferred to the outer loop. … Read more

C- Loop control statement

Loop control statements are also known as Jump statement. The use of jump statement changes the state of execution. This statement help in exiting the loops statement. C supports three control statements. break statement continue statement goto break statement in C break statement is mostly used in a switch statement to terminate the cases present … Read more

C – do while loop

do-while loop in C is just as same as while loop, the only difference is that in do-while the condition is always executed after the loop as shown in the syntax below. Unlike while loop, where the body of the loop is executed only if the condition stated is true but in the do-while loop, … Read more

C – while Loop

A while loop is a straightforward loop and is also an entry-control loop. It evaluates the condition before executing the block of the loop. If the condition is found to be true, only then the body of the loop is executed. The loop continues until the condition stated is found to be false. while loop … Read more

C – for loop

In C programming, for loop is a more efficient loop structure and is an entry-control loop. The iteration continues until the stated condition becomes false. It has three computing steps as shown in the syntax below. for loop Flowchart: Syntax of for loop. Example of for loop in C Program. The output of for loop in C … Read more

C – Loops

There may be times in a program where a block of code needs to be executed several times sequentially. In such cases, Loops are used to execute a sequence of statements many times until the stated condition becomes false. Two Types of Loops in C Programming. 1. Entry controlled loop: In this type loop, the … Read more

C – switch statement

A switch statement allows a variable to be tested for equality against multiple values and each of those values is called a case. It can be used instead of nested if…else. Switch expression and case value must be of the same type. There must be at least one case or multiple cases with unique case … Read more

C – nested switch statement

The use of switch statement inside another switch statement is called nested switch statement. Syntax Syntax of nested switch statement in C: Example of nested switch statements in C: The output of nested switch statements in C. The OUTER Switch. The INNER Switch.

C – if statement

An if statement consists of a Boolean expression followed by one or more statements.If the boolean expression is true, the block of code inside the if statement will be executed else not. Syntax Syntax of if statement in C: if statement Flowchart: Example of if statement in C Program: The output of if statement in C. num1 is … Read more