If using goto simplifies the code, then it would be appropriate.
for (;;)
{
for (;;)
{
break; /* breaks inner loop */
}
for (;;)
{
goto outer; /* breaks outer loop */
}
}
outer:;
More Related Contents:
- HOW to back for the beginning if the user press any key except 1 or 2 or 3? [closed]
- I need help understanding this code in C [closed]
- Simple counters not working in C
- break statement doesn’t work in a loop [closed]
- How to iterate over this series 5 6 7 6 5 6 7 6 5 6 7 6 5… in C? [closed]
- Finding target sum of two numbers in array
- How to break out of while loop in C
- C loop optimization help for final assignment (with compiler optimization disabled)
- Validate the type of input in a do-while loop C
- How to split a string literal across multiple lines in C / Objective-C?
- For vs. while in C programming?
- Generate a random number within range? [duplicate]
- Effect of semicolon after ‘for’ loop
- Objective-C sample code for HMAC-SHA1 [closed]
- Is it faster to count down than it is to count up?
- Variably modified array at file scope
- Checking the size of an object in Objective-C
- Limit a double to two decimal places [duplicate]
- Objective C: SHA1
- No loop condition in for and while loop
- Is it ok to use “classic” malloc()/free() in Objective-C/iPhone apps?
- What is double star (eg. NSError **)?
- How can I avoid “duplicate symbol” errors in xcode with shared static libraries?
- Convert objective-c typedef to its string equivalent
- How to optimize these loops (with compiler optimization disabled)?
- Validate the type of input in a do-while loop
- When implementing an infinite loop, is there a difference in using while(1) vs for(;;) vs goto (in C)?
- Is there any way to loop through a struct with elements of different types in C?
- Why does NSError need double indirection? (pointer to a pointer)
- How can I optimize these loops (with compiler optimization disabled)?