First please view below codes...
I was so confuses with recursion function...I mean how could the output will be 2? I hope that someone could explain how recursion works in details to me please? Very thanks you.Code:#include <stdio.h> int strange (int n); main(void) { int n = 4, result; result = strange (n); printf("%d", result); } int strange (int n) { int ans; if (n ==1) ans = 0; else ans = 1 + strange (n/2); return (ans); }