Question: Consider the following pseudocode, assuming dynamic scoping rules: procedure main ( ) x: int : = 3 y: int: = 5 procedure mult ( )

Consider the following pseudocode, assuming dynamic scoping rules:
procedure main()
x: int :=3
y: int:=5
procedure mult()
x:= x*y
print(x)
procedure three(f:procedure)
x: int :=7
f()
procedure two()
y: int :=9
one(three , mult)
procedure one(f1: procedure, f2:procedure)
x:int :=1
f1(f2)
//main body
two()
print(x)
If the language uses deep binding, what will the output be? Explain your answer
3/3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!