1.

If the programming language uses static scoping and call by need parameter passing mechanism, the values printed will be?(a) 115, 220(b) 25, 220(c) 25, 15(d) 115, 105I got this question in quiz.The doubt is from L-Attributed Definition topic in section Syntax Directed Definition and Translations of Compiler

Answer»

Correct option is (d) 115, 105

The best I can explain: So i = 100 & j = 5 P (i + j) = P (100 + 5) = P(105) So x = 105 x + 10 = 105 + 10 = 115 So 115 & 105 will be PRINTED.



Discussion

No Comment Found

Related InterviewSolutions