Theoreticaly and doing it in paper:
f(1,2,2)->return f(1-1,f(1,2,2-1),f(1,2,2-1)+2) Then we do the internal
Both are the same f(1,2,2-1) -> return f(0,f(1,2,1-1),f(1,2,1-1)+1) again the internal
Again both are the same -> return 2 (x=2); so we go back
return f(0, f(1,2,1-1) -> 2, f(1,2,1-1) ->2+1) -> f(0, 2, 3) -> return 2+3(x+y);
Again back f(0, f(1,2,2-1) -> 5, f(1,2,2-1) ->5+2) -> return 5+7(x+y) -> The answer is 12;
solved Obfuscated C recursion Code Please explain [closed]