Page 1
Wink Notes
B.Tech CSE — 1st Semester
Programming for Problem Solving in C
— Unit - 2 —
1. Why Control Structures Exist
Without control statements a program is a straight line: every statement runs once, in order. Real problems need choices and repetition, and structured programming allows exactly three ways to arrange them.
Sequence
Statements execute one after another, top to bottom.
Selection
A condition decides which block runs: if, if-else, switch.
Iteration
A block repeats while a condition holds: while, do-while, for.