Learn how to decide the order of execution of a program based on the given conditions.

We'll cover the following

Decision statements

There often come instances when you can not follow a sequential order and instead have to decide the order of the statements’ execution based on certain conditions. In such scenarios, decision statements are used to select one path from the given paths.

For example, if I get time, I would play Pokemon; if there is a good movie on TV, I will stay at home; if I get a visa, I will fly next month; if you do it, so would I.

Considering all of these statements together, you will notice which action to take depends on a certain condition being met. While writing a C program, one has to perform different sets of actions depending on the satisfaction or failure of one or multiple conditions.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.