Find an Output for the Given C Program
#include int main() { int i=4; switch(i) { case 1: printf("This is case 1\n"); break; default: printf("This is default\t"); case 2: printf("This is case 2\t"); break; case 3: printf("This is case 3\t"); } return 0; }
Answers
Answered by
8
The output will be: This is default TAB This is case2 TAB
==============
#include
int main() {
int i=4;
switch(i) {
case 1: printf("This is case 1\n"); break;
default: printf("This is default\t");
case 2: printf("This is case 2\t"); break;
case 3: printf("This is case 3\t");
}
return 0;
}
==============
#include
int main() {
int i=4;
switch(i) {
case 1: printf("This is case 1\n"); break;
default: printf("This is default\t");
case 2: printf("This is case 2\t"); break;
case 3: printf("This is case 3\t");
}
return 0;
}
Similar questions
Math,
8 months ago
English,
8 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
English,
1 year ago
Math,
1 year ago
Science,
1 year ago