x : integer –– global
procedure set x(n : integer)
x := n
procedure print x
write integer(x)
procedure first
set x(1)
print x
procedure second
x : integer
set x(2)
print x
set x(0)
first()
print x
second()
print x
----------------
What does this program print if the language uses static scoping?What does
it print with dynamic scoping?Why?
3 replies to this topic
#1
Posted 24 March 2011 - 02:38 AM
|
|
|
#2
Posted 24 March 2011 - 10:19 AM
:: sniff sniff :: Hmmm... Yup. Smells suspiciously like homework.
-CDG10620
Software Developer
Software Developer
#3
Posted 25 March 2011 - 06:08 AM
cdg10620 said:
:: sniff sniff :: Hmmm... Yup. Smells suspiciously like homework.
No No..i was reading the ebook of fundamentals..i am new to programming world. thats it.
#4
Posted 26 March 2011 - 04:47 PM
What do you think the answer is, and why?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









