answersLogoWhite

0

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");

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

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<10;x++) { //continue; for(int y=0;y<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).


What is break in c?

The break statement is used to exit a loop or switch-case.


Who can used to exit from a loop?

If you meant 'what can be used' then it is statement break.


When a sequential search uses a for loop a break statement is used to end the loop when a match is found?

It is a possible solution, yes.


What statement is used to skip a part of loop?

The continue statement is used to skip the balance of a loop.


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.


How would you define Continue statement?

A continue statement is used to "branch" to the end of a loop without exiting the loop. If we wish to exit the loop entirely, use a break or return statement.for (int i=1; i


How do you fix an infinite loop?

It comes from its name: it doesn't terminate, the user have to interrupt the program-run (in the worst case: power off the computer).The infinite loop is also used to program loops with non-easily-deterministically end-of-loop conditions.You write an infinite loop, such as for (;;) {statements}, and break out of the loop with the break statement when ready to terminate.


What keyword is used to jump out of a loop without waiting to get back to the conditional test?

break


Where is the continue statement NOT usually used?

The continue statement is not actually used when it is the last statement of the body of the loop. Plus: outside any loop it is rarely or never used.


What are the differences between Break Continue and Exit?

break - The break statement is used to jump out of loop. After the break statement control passes to the immediate statement after the loop.continue - Using continue we can go to the next iteration in loop.exit - it is used to exit the execution of program.note: break and continue are statements, exit is function.


Compare break and continue statement?

Break - will force to terminate the loop you are in to the nearest outer block.Continue - will force to skip the rest of the code in loop and take next iteration.Break for example is not only limited to loop constructions, it is also used in switch statement in order to stop executing following cases (works as described above, jumps out of switch).