Lesson 7 of 50 · c
Control Flow – if / else
Duration: 6 mins
if statements execute a block when a condition is true. An optional else clause runs when the condition is false.
if (x > 0) {
printf("positive\n");
} else {
printf("non‑positive\n");
}