The output of the program if dynamic scoping is used__?
https://gateoverflow.in/293734/dynamic-programming-basics
Shubhgupta
the answer is 304 right?
@Somoshree Datta 5 please post the solution.
@balraj_allam Everything is same. Only trick is while executing f3(), you update the x in the main to 100. Thus, when x=x+f1()+f2()+f3()+f1() is executed, x will be 100. Rest, if u calculate, f1 will return 26, f2 51, f3 100 and f1 as 27.
@gauravkc @Shubhgupta then it should be 303..how 304?
gaurav already explained this, @himgta where are you getting flaw in his explanation.
64.3k questions
77.9k answers
244k comments
80.0k users