Back to Browse

Previous Year Gate Question on Static Scoping | GATE 1987 | Data Structures and Algorithms | PYQs

239 views
May 1, 2021
3:35

GATE 1987 | 2 Marks | Design and Analysis of Algorithms ---------------------------------------------------------------------------------------------------------------- Study the following program written in a block-structured language: Var x, y:interger; procedure P(n:interger); begin x:=(n+2)/(n-3); end; procedure Q Var x, y:interger; begin x:=3; y:=4; P(y); Write(x) __(1) end; begin x:=7; y:=8; Q; Write(x); __(2) end. What will be printed by the write statements marked (1) and (2) in the program if the variables are statically scoped? 3,6 6,7 3,7 None of the above. --------------------------------------------------------------------------------------------------------------- Song: Elektronomia & RUD - Memory [NCS Release] Music provided by NoCopyrightSounds Free Download/Stream: http://ncs.io/Memory Watch: http://youtu.be/EnuGdwI0W1g

Download

0 formats

No download links available.

Previous Year Gate Question on Static Scoping | GATE 1987 | Data Structures and Algorithms | PYQs | NatokHD