0

How can I break out of nested loops in C without using goto, if I have "while" in "while" for example?

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
Darius
  • 1
  • 1
  • 3

1 Answers1

1

If you can put both loops into a function the return statement could be used. Else the outer loop needs a further condition.

Onik
  • 17,358
  • 12
  • 67
  • 87
Tobias Wollgam
  • 721
  • 2
  • 7
  • 23