Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following C code?
#include < stdio.h >
int main()
{
int x = 97;
switch (x)
{
case ‘a’:
printf(“yes “);
break;
case 97:
printf(“no\n”);
break;
}
}

What will be the output of the following C code?
#include < stdio.h >
int main()
{
int x = 97;
switch (x)
{
case ‘a’:
printf(“yes “);
break;
case 97:
printf(“no\n”);
break;
}
}
a) yes
b) yes no
c) Duplicate case value error
d) Character case value error

Answer: c

Join The Discussion