What is the output of C Program with Switch Statement?
int main()
{
int a=5;
switch(a)
{
case 0: printf("0 ");
case 3: printf("3 ");
case 5: printf("5 ");
default: printf("RABBIT ");
}
a=10;
switch(a)
{
case 0: printf("0 ");
case 3: printf("3 ");
case 5: printf("5 ");
default: printf("RABBIT "); break;
}
return 0;
}
What is the output of C Program with switch statement or block?
int main()
{
int a=3;
switch(a)
{
}
printf("MySwitch");
}
1 Crore+ students have signed up on EduRev. Have you? Download the App |
What is the output of C program with switch statement or block?
int main()
{
int a;
switch(a);
{
printf("DEER ");
}
printf("LION");
}
What is the output of C program with switch statement or block?
int main()
{
char code='K';
switch(code)
{
case 'A': printf("ANT ");break;
case 'K': printf("KING "); break;
default: printf("NOKING");
}
printf("PALACE");
}
What is the output of C Program with switch statement or block.?
int main()
{
char code='A';
switch(code)
{
case 64+1: printf("ANT ");break;
case 8*8+4: printf("KING "); break;
default: printf("NOKING");
}
printf("PALACE");
}
What is the output of C Program with switch statement or block.?
int main()
{
int k=64;
switch(k)
{
case k<64: printf("SHIP ");break;
case k>=64: printf("BOAT "); break;
default: printf("PETROL");
}
printf("CHILLY");
}
What is the output of C Program with switch statement or block.?
int main()
{
int k=25;
switch(k)
{
case 24: printf("ROSE ");break;
case 25: printf("JASMINE "); continue;
default: printf("FLOWER ");
}
printf("GARDEN");
}
What is the output of C Program with switch statement or block?
int main()
{
int a;
switch(a)
{
printf("APACHE ");
}
printf("HEROHONDA");
}
What is the output of C Program with switch statement or block?
What is the output of C Program with switch statement or block?
int main()
{
char code='K';
switch(code)
{
case "A": printf("ANT ");break;
case "K": printf("KING "); break;
default: printf("NOKING");
}
printf("PALACE");
}
What is the output of C Program with switch statement or block?
int main()
{
char code=64;
switch(code)
{
case 64: printf("SHIP ");break;
case 8*8: printf("BOAT "); break;
default: printf("PETROL");
}
printf("CHILLY");
}
What is the output of C Program with switch statement or block.?
int main()
{
int k=8;
switch(k)
{
case 1==8: printf("ROSE ");break;
case 1 && 2: printf("JASMINE "); break;
default: printf("FLOWER ");
}
printf("GARDEN");
}
What is the output of C Program with switch statement or block.?
int main()
{
switch(24.5)
{
case 24.5: printf("SILVER ");break;
case 25.0: printf("GOLD "); break;
default: printf("TIN ");
}
printf("COPPER");
}