C Quick Refresher
Player version:
3.5.8
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
Mini player
xD7

switch...case program
What is the output of the following program?
int main()
{
int m;
char result[20];
/* Find the output if the m value is 5, 9 & 11. */
m = 9;
switch(m)
{
case 1:
strcpy(result, "Good");
break;
case 2:
strcpy(result, "Better");
break;
case 3:
case 4:
case 5:
strcpy(result, "Best");
break;
case 6:
case 7:
case 8:
strcpy(result, "Perfect!");
break;
case 9:
case 10:
strcpy(result, "Outstanding!");
break;
default:
strcpy(result, "Invalid Input!");
break;
}
printf("%s", result);
}


No Comments..!

Change Subject:



Select Course...