Which of the following cannot be checked in a switch-case statement?

Home | Discussion Forum
Taiyari24Hour

Which of the following cannot be checked in a switch-case statement?



View More Related Question

2) What is the output of this C code(When 1 is entered)?

#include <stdio.h>
void main()
{
int ch;
printf("enter a value btw 1 to 2:");
scanf("%d", &ch);
switch (ch)
{
case 1: printf("1\n");
default: printf("2\n");
}
}

3) A switch statement is used to:

4) What is the output of this C code?

#include <stdio.h>
int main()
{
float f = 1;
switch (f)
{
case 1.0: printf("yes\n");
break;
default: printf("default\n");
}
}

5) What is the output of this C code?

#include <stdio.h>
int main()
{
switch (printf("Do"))
{
case 1: printf("First\n");
break;
case 2: printf("Second\n");
break;
default: printf("Default\n");
break;
}
}

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.