in Programming in C
542 views
0 votes
0 votes

The output of the program if dynamic scoping is used__?

in Programming in C
542 views

11 Comments

is 1187????
0
0
624?
0
0

the answer is 304 right?

0
0
yes
0
0

@Somoshree Datta 5 please post the solution.

 

0
0

@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. 

0
0

@ @ then it should be 303..how 304?

0
0

gaurav already explained this, @himgta where are you getting flaw in his explanation.

0
0
100+26+51+100+27 is 304
0
0
ya ..I got it...f2() will return 51 ,I was putting 50 only!

Thanks!
0
0

Please log in or register to answer this question.

Related questions