answersLogoWhite

0

Yes. The same goes for for-loop and do-while-loop.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Can a continue statement be used in a switch statement?

If you have a loop in your switch statement or around your switch statement, you can use the continue statement in that. You cannot use a continue statement outside of a loop (do, for, or while).


What are control structures used in javascript?

The control structures used in java script are if-statement, for-loop, for-in loop, while loop,do-while loop, switch-statement, with-statement. try-catch-finally statements.


What is the purpose of break statement in c?

The break statement exits control of the innermost for, while or do-while loop, or switch statement.


Why you use for loop inside switch statement?

Because you have to repeat something. (Or you can use while-loop, too.)


Write a program that will graph using for loop?

A = 5do{statement;A = A + 1;} while (A < 10)


How do you break a loop in a switch case statement?

using break; statement


Advantage and disadvantage of for loop over while looop?

Any for loop is equivalent to some while loop, so the language doesn't get any additional power by having the for statement. For certain type of problem, a for loop can be easier to construct and easier to read than the corresponding while loop. The for statement makes a common type of while loop easier to write. It is a very good (perhaps the best) choice for counting loops.


What are break and continue statement in c language?

Break is used to exit the closest loop. Continue will cause the program to go to the beginning of the loop. for(int x=0;x&lt;10;x++) { //continue; for(int y=0;y&lt;10;y++) { break; } } The break statement causes the inner loop to stop at the first iteration. If the continue statement was uncommented, the inner loop would never be executed because the program would jump back to the beginning(until x = 10 of course).


Can break statement be used without any loop?

The Break statement should generally get executed in some loop or switch statement. The below code will give compiler error. void main() { printf("12"); break; printf("14"); }


Difference between for and while loop not in syntactically?

Well 'while' goes like this: while (condition) statement 'for': for (initialize; condition; after-each-loop) statement


What is the definition of 'nested' in C programming?

In C a structure within a structure is called nested. For example, you can embed a while loop in another while loop or for loop in a for loop or an if statement in another if statement.


How can you define null statement in loop in C programming?

If you are using for loop for(;;); or you can also define condition and iterations but the loop has to close there itself without any statement inside it. In the similar way you can define while and do while loop without any statement.