Please explain this program? Why the answer of the program is 1621 ?
#include
int main()
{
int i;
for(i=0;i<20;i++)
{
switch(i)
{
case 0: i+=5;
case 1: i+=2;
case 5: i+=5;
default: i+=4;
}
printf("%d", i);
}
return 0;
}
Answers
Answered by
0
Answer:
int main()
{
int x = 2;
switch (x) {
x--;
switch (x) {
case 1:
printf("Hello");
break;
case 2:
printf("GFG");
break;
case 3:
printf("Welcome");
break;
default:
printf("BYE");
}
}
return (0);
Similar questions
Physics,
2 months ago
Math,
2 months ago
Social Sciences,
2 months ago
Math,
5 months ago
Hindi,
5 months ago
Social Sciences,
11 months ago
Science,
11 months ago