Find the output of the below program: #include int fun(int a, int b) { if (b == 0) { return 0; } if (b% 2 == 0) { return fun(a++, b/2); } return fun(a+a, b/2) + a; } int main() { int x=10y=7; int z=fun(y,x); printf("%d",z); return 0; }
Answers
Answered by
19
Explanation:
b% 2 == 0) { return fun(a++, b/2); } return fun(a+a, b/2) + a; } int main() { int x=10y=7; int z=fun(y,x); printf("%d",z); return 0; }
Similar questions
Math,
4 hours ago
Environmental Sciences,
4 hours ago
Computer Science,
4 hours ago
History,
8 hours ago
English,
8 hours ago
Physics,
8 months ago
Chemistry,
8 months ago