+ 1
Why answer is 16?
2 Answers
+ 8
func(2) returns 4.
So, func(func(2)) = func(4)
func(4) returns 16.
So, func(func(2)) = func(4) = 16.
+ 2
Because you have a function within a function, so after the first function has run, the result of that function will be inputted.
So after the first function, the answer return is 4 (2x2).
Then 4 is inputted and 16 is the answer (4x4).