User talk:Slnishath

Hi friends, Please explain how the output 40 comes for the following code. int fn(int b) { if ((b == 1) || (b == 0)) return 1; else if((b % 2) == 0) fn(b/2)+2; else fn(b-1) +3; } main { printf("%d", fn(7)); }