924 views
0 0 votes
BREAK can be used in switch-case but CONTINUE is not allowed in switch-case but CONTINUE is allowed in DEFAULT case of switch-case..is it correct??

1 Answer

2 2 votes

No,CONTINUE is not allowed in DEFAULT case of switch-case.

Here see output of code (using continue statment DEFAULT case )

for more -

Position:
Show:

Related questions

2 2 votes
2 2 answers
2.5k
2.5k views
Hira Thakur asked Sep 14, 2018
2,540 views
int main() { int a =50; switch(a) { default: a=45; case 49: a++; case 50: a ; case 51: a =a+1; } printf("%d",a); }my doubt is the default case is not executed here why??,...
1 1 vote
1 answers 1 answer
1.2k
1.2k views
V Y asked Jun 29, 2017
1,178 views
Output of the following program?#include <stdio.h char input[ ] = "SSSWILTECH1\1\11W\1WALLMP1"; main() { int i,c; for( i=2 ; ( c=input[i] ) ! = '\0' ; i++) { switch(c) { ...
7 7 votes
2 2 answers
501
501 views
Cutoff_Breaker asked Jul 10
501 views
What is the output given exp = 4?switch (exp){ default: printf("default\n"); case 5: printf("5\n"); case 3: printf("3\n"); case 2: ...
10 10 votes
1 1 answer
338
338 views
GO Classes asked Jun 3
338 views
What is the output of the following code?#include <stdio.h int main() { int x = 2, y = 0; switch (x) { case 1: y = y + 1; case 2: y = y + 2; case 3: y = y + 3; break; def...