DIt chooses between two actions based on a condition.
Step-by-Step Solution
Solution:
Step 1: Understand the purpose of if-else
An if-else statement lets the program pick one of two paths depending on whether a condition is true or false.
Step 2: Match the description to the options
Only It chooses between two actions based on a condition. describes choosing between two actions based on a condition, which is exactly what if-else does.
Final Answer:
It chooses between two actions based on a condition. -> Option D
Quick Check:
If-else = choose between two paths [OK]
Quick Trick:If you want two choices, use if-else [OK]
Common Mistakes:
Confusing if-else with loops
Thinking if-else declares variables
Mixing if-else with function definitions
Master "onditional Statements" in C
9 interactive learning modes - each teaches the same concept differently