C Control Statements

Normally program is executed from top to bottom i.e execute sequentially, we don’t have to do anything at all. But in some programming situation, we may have to change the order of execution of statements based on certain conditions. Or we want a set of instructions to be executed in one situation, and an entirely different set of instructions to be executed in another situation. For this situation, C provides decision-making statements also known as control statements.

Control Statements

Control statements allow the user to alter the flow of the program depending upon some conditions.

A decision control instruction can be implemented in C using following control statements:

C has three major decision making instructions—the if statement, the if-else statement, and the switch statement. A fourth, somewhat less important structure is the one that uses conditional operators.

We discuss each control instruction in our another post with there flowchart, examples in detail.

Ankit Wasankar

Senior Java Developer
Java 11 | Microservices | Reactjs | SQL

Help others by sharing the content!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.