Question

How to properly select the right loop in C?


Annonce
Ad

Answer

The for loop is generally used when the loop is run a known number of time, otherwise while is chosen when the code must be run at least once. Lastly, when none of the previous conditions are fulfilled, do .. while is recommended.


[source]
# ID Query