edited by
378 views

2 Answers

Best answer
2 votes
2 votes
g(4) = g(1) + g(1) = 3 + 3 =6.

f(g(4)) = f(6)

         = f(6-2 ) + g( 6-2)             = f(4) + 6

          = f(4-2) + g(4-2) + 6        = f(2) + g(2) + 6

          = 1 + 6 + 6                     // g(2) = g(-1) + g(-1) = 6

          = 13.
selected by
0 votes
0 votes

in f(g(4))
firstly we calculate g(4)

g(4) will call g(1) + g(1) which will give (3+3) =6

now f(6)is called

step 1: f(6) calls f(4) + g(4) = f(4) + 6 = 7+ 6= 13(from step 2) which is the ANSWER

step 2: f(4) calls f(2) + g(2) = 1+6 = 7 (from step 4 & 3)

step 3:g(2) calls g(1) + g(1)=6

step 4:f(2) will return1 to f(4)

Related questions

2 votes
2 votes
1 answer
1
0 votes
0 votes
1 answer
2
Markzuck asked Jan 10, 2019
494 views
Please explained detialed execution of this code, I am not getting how int stored in char, like we can interchange using ASCII but still cant store right?
1 votes
1 votes
0 answers
4