A

Admin • 833K Points
Coach

Q. What will be output for the following code?

Code:
#include <stdio.h>
main()
{
int num=5;
int fun(int num);
printf(""%d"",fun(num));
}
int fun(int num)
{
if(num>0)
return(num+fun(num-2));
}
  • (A) 6
  • (B) 7
  • (C) 8
  • (D) 9
  • Correct Answer - Option(C)
  • Views: 23
  • 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.