Why Decision Control Statements? C

In day-to-day life, most of the time we think according to changing condition. We take action based on some decision, which depend on certain conditions.

E.g. If I work hard, I will get promotion else I will lose my job. Thus decision is taken depending upon the condition. In order to solve problem that are more realistic, much broader and more interesting, we need the facility of conditional and selective execution. Many programs require that a logical test be carried out at some particular point within the program. An action will then be carried out whose nature depends upon the outcome of logical test. This is known as conditional expression. A special kind of conditional execution is one in which one group of statement is selected from several available groups. This is known as selection.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

C Topics