A

Admin • 828.03K Points
Coach

Q. What is the output of C program?

Code:
int fun()
{
static int num = 16;
return num--;
}

int main()
{
for(fun(); fun(); fun())
printf("%d ", fun());
return 0;
}
  • (A) Infinite loop
  • (B) 13 10 7 4 1
  • (C) 15 12 8 5 2
  • (D) 14 11 8 5 2
  • Correct Answer - Option(D)
  • Views: 14
  • Filed under category C Programming
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.