Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Variable scoping
Recent questions tagged variable-binding
4
votes
3
answers
1
ISRO-2013-7
Consider the following psuedocode: x: integer := 1 y: integer := 2 procedure add x:= x + y procedure second (P: Procedure) x: integer := 2 p() procedure first y: integer := 3 second (add) first () write_integer(x) What does it print if the language uses dynamic scoping with deep binding? $2$ $3$ $4$ $5$
Consider the following psuedocode:x: integer := 1 y: integer := 2 procedure add x:= x + y procedure second (P: Procedure) x: integer := 2 p() procedure first y: integer :...
makhdoom ghaya
8.2k
views
makhdoom ghaya
asked
Apr 25, 2016
Compiler Design
isro2013
runtime-environment
variable-binding
+
–
7
votes
3
answers
2
What is the difference between static scoping and dynamic scoping?
sampad
8.1k
views
sampad
asked
Oct 11, 2015
Programming in C
programming
variable-binding
+
–
7
votes
1
answer
3
GATE IT 2007 | Question: 35
Early binding refers to a binding performed at compile time and late binding refers to a binding performed at execution time. Consider the following statements: Static scope facilitates w1 bindings. Dynamic scope requires w2 bindings. Early bindings w3 ... , decrease, increase Late, early, increase, decrease Late, early, decrease, increase Early, late, increase, decrease
Early binding refers to a binding performed at compile time and late binding refers to a binding performed at execution time. Consider the following statements:Static sco...
Ishrat Jahan
5.2k
views
Ishrat Jahan
asked
Oct 29, 2014
Programming in C
gateit-2007
programming
variable-binding
normal
out-of-syllabus-now
+
–
15
votes
3
answers
4
GATE IT 2007 | Question: 34, UGCNET-Dec2012-III: 52
Consider the program below in a hypothetical programming language which allows global variables and a choice of static or dynamic scoping. int i; program main() { i = 10; call f(); } procedure f() { int i = 20; call g (); } procedure g() { print i; } Let $x$ be the ... . Then, $x$ and $y$ are: $x=10, y=20$ $x=20, y=10$ $x=10, y=10$ $x=20, y=20$
Consider the program below in a hypothetical programming language which allows global variables and a choice of static or dynamic scoping.int i; program main() { i = 10; ...
Ishrat Jahan
7.6k
views
Ishrat Jahan
asked
Oct 29, 2014
Programming in C
gateit-2007
programming
variable-binding
easy
ugcnetcse-dec2012-paper3
+
–
1
votes
1
answer
5
GATE CSE 1994 | Question: 22
Consider the program below: Program main: var r:integer; procedure two: begin write (r); end procedure one: var r:integer; begin r:=5; two; end begin r:=2; two; one; two; end What is printed by the above program if Static scoping is assumed for all variables; Dynamic scoping is assumed for all variables. Give reasons for your answer.
Consider the program below:Program main: var r:integer; procedure two: begin write (r); end procedure one: var r:integer; begin r:=5; two; end begin r:=2; two; one; two; ...
Kathleen
1.8k
views
Kathleen
asked
Oct 5, 2014
Programming in C
gate1994
programming
variable-binding
normal
out-of-gate-syllabus
+
–
6
votes
2
answers
6
GATE CSE 1999 | Question: 2.13
Consider the following program in a language that has dynamic scooping: var x: real; procedure show: begin print(x);end; procedure small; var x: real; begin x: = 0.125; show; end; begin x:=0.25 show; small end. Then the output of the program is: 0.125 0.125 0.25 0.25 0.25 0.125 0.125 0.25
Consider the following program in a language that has dynamic scooping:var x: real; procedure show: begin print(x);end; procedure small; var x: real; begin x: = 0.125; sh...
Kathleen
5.8k
views
Kathleen
asked
Sep 23, 2014
Programming in C
gate1999
programming
variable-binding
normal
out-of-syllabus-now
+
–
2
votes
2
answers
7
GATE CSE 2003 | Question: 75
Consider the following class definitions in a hypothetical Object Oriented language that supports inheritance and uses dynamic binding. The language should not be assumed to be either Java or C++, though the syntax is similar. Class P { Class Q subclass of P { void f(int ... P. The output produced by executing the above program fragment will be 1 2 1 2 1 1 2 1 2 2 2 2
Consider the following class definitions in a hypothetical Object Oriented language that supports inheritance and uses dynamic binding. The language should not be assumed...
Kathleen
5.5k
views
Kathleen
asked
Sep 17, 2014
Programming in C
gatecse-2003
programming
variable-binding
normal
out-of-syllabus-now
+
–
To see more, click for the
full list of questions
or
popular tags
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register