Q. What will be the output of below code?

Code:
int i = 4;
switch (i)
{
default: ;
case 3:
i += 5;
if ( i == 8)
{
i++;
if (i == 9) break;
i *= 2;
}
i -= 4;
break;

case 8:
i += 5;
break;
}
printf(“i = %dn”, i);
  • (A) i = 5
  • (B) i = 8
  • (C) i = 9
  • (D) i = 10
πŸ’¬ Discuss
βœ… Correct Answer: (A) i = 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
235
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
84%
Success Rate