Decisoin Making in C

Last Updated Nov 4, 2015, 07:00:14 PM





Decision making simply determines whether or not a particular statement should execute based on some given condition. The condition can be of any type.

Decision making is very useful skill set to determine the results of certain actions performed by the computer. In other words, programming also works like the human brain. It performs certain actions and returns the best results based on some given condition. For example, if the student gets more than 40 marks in example show the result as he is PASSED otherwise show the result as he is FAILED

c decision making

C programming has different types of decisoin making statements which can be used in different situations. Let us understand these statements



S.NO Statement Description Example
1 If Statement Execute the condition if a specific condition is met Try It Now
2 If else Statement If the given condition is not met, execute other statement Try It Now
3 Nested If Statement Nested if statement used nested statements inside one. Try It Now
4 Switch Statements in C Used to chose one particular statement among many. Try It Now