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,738
  • 21
  • 105
  • 131
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
  • 19,396
  • 14
  • 68
  • 91
Tobias Wollgam
  • 761
  • 2
  • 8
  • 25