TRENDING TOPICS

×

Decision Making Statements in C

Learn all about Decision Making Statements in C and types of Decision Making Statements in C

In any programming language decision making is a core concept, A programmer must have the knowledge of decision making. Read the below lines carefully!

  • If there is a football match on TV I would stay at home.
  • If I get $1000 I would buy a computer this month.
  • If I will pass in the exam I would like to give a party.

In the above sentence, the decision will be made on some conditions, if the condition is true then the task will happen otherwise not.

In the same ways, In C programming decisions are also made based on some conditions. For example...

Condition for voting

age >= 18;

If condition is true

If the above condition is true then, the boy is eligible for voting.

If condition is false

If the above condition is false then, the boy is not eligible for voting.

The above example is a very small example but as a programmer, we have work on large data that may need many decisions based on various conditions.

Types of Decision Making Statements in C

In C programming there are 4 ways to make a decision about the conditions. It totally depends on the programmer which decision making technique he wants to use to make the decision. All 4 techniques are listed below.

  • if statement
  • if else statement
  • Nested if else statement
  • switch case statement.

From the next chapter we will study all decision making statements one by one in details.

Advertise With Us

We offer sponsored posts and guest posts with do-follow links, back-links, and other advertising services, To advertise email us at "advertise@gdatamart.com"

© 2021 GDATAMART.COM (All Rights Reserved)