Which loop is most appropriate when the number of iterations is known beforehand?

  • do-while
  • for
  • foreach
  • while
The 'for' loop is most appropriate when the number of iterations is known beforehand. It is often used to iterate over a sequence or a range of values.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *