1.

Study the following program written in a block-structured language: var x, y : integer; procedure P(n:integer); begin x: = (n + 2) / (n - 3); end; procedure Q var x, y : integer; begin x: = 3; y: = 4; P(y); Write (x) ...(1) end; begin x: = 7; y: = 8; Write (x) ...(2) end What will be printed by write statements marked (1) and (2) in the program if variables are statically scoped?

A. 3, 6
B. 6, 7
C. 3,7
D. None of these
Answer» B. 6, 7


Discussion

No Comment Found