Jump to content

i need help in solving this quest

- - - - -

  • Please log in to reply
3 replies to this topic

#1
Xanli

Xanli

    Newbie

  • Members
  • Pip
  • 2 posts
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?

#2
cdg10620

cdg10620

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 389 posts
:: sniff sniff :: Hmmm... Yup. Smells suspiciously like homework.
-CDG10620
Software Developer

#3
Xanli

Xanli

    Newbie

  • Members
  • Pip
  • 2 posts

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
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
What do you think the answer is, and why?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users