About 50 results
Open links in new tab
  1. c - Difference between "while" loop and "do while" loop - Stack …

    Sep 2, 2010 · The most important difference between while and do-while loop is that in do-while, the block of code is executed at least once, even though the condition given is false.

  2. loops - For vs. while in C programming? - Stack Overflow

    There are three loops in C: for, while, and do-while. What's the difference between them? For example, it seems nearly all while statements can be replaced by for statements, right? Then, …

  3. Endless loop in C/C++ - Stack Overflow

    Nov 25, 2013 · While while(2), while(3) and while(0.1) would equally make sense. But just to be conformant with other C programmers, I would write while(1), because lots of C programmers …

  4. c - Is the code "while (condition);" valid and what does it mean ...

    Can we put semicolon like while (condition); in a C Programming? If while (condition); is valid, what does it mean?

  5. C: While Loop With Logical OR - Stack Overflow

    Jan 20, 2016 · I am writing a simple text game in C where the player combats a very simple AI. Inside the main() function, there is a loop that should continue as long as the player's HP or …

  6. How to write a while loop with multiple conditions in C

    Oct 31, 2016 · How to write a while loop with multiple conditions in C Asked 9 years, 2 months ago Modified 3 years, 4 months ago Viewed 6k times

  7. c - How to exit a while-loop? - Stack Overflow

    Mar 18, 2013 · Thank you very much for your answer.Yes it's easy but how to get out of while.What I need to enter to get false in while condition.

  8. C# While Loop vs For Loop? - Stack Overflow

    In C# a question has been bugging me for a while and its what is that actual major difference between a While and For Loop. Is it just purely readability ie; everything you can essentially do …

  9. What is the proper equivalent of "while(true)" in plain C?

    Jun 6, 2015 · I personally wouldn't use a do / while loop, because the condition is at the bottom. There are trickier ways to write an infinite loop (while (1 + 1 == 2) et al, but none of them are …

  10. c - continue statement in a do while loop - Stack Overflow

    When you use continue statement, further statements inside the loop get skipped and control goes to next iteration which is "condition check" in your case (in case of for loop, it goes to the …