Friday, March 5, 2010

48

int main()
{
float a=1;
switch(a)

{
case 1:
printf("%f",a);
break;
defualt:
printf("Default");
}
return 0;
}

Output:


Compilation Error

LOGIC


we can use only integer constants or character constants in switch case. We can't use float values in switch case.

0 comments:

Post a Comment