• edited by
6,751 views
7 7 votes

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:

  1. Static scope facilitates w1 bindings.
  2. Dynamic scope requires w2 bindings.
  3. Early bindings w3 execution efficiency.
  4. Late bindings w4 execution efficiency.

The right choices of w1, w2, w3 and w4 (in that order) are

  1. Early, late, decrease, increase
  2. Late, early, increase, decrease
  3. Late, early, decrease, increase
  4. Early, late, increase, decrease

1 Answer

Best answer
20 20 votes
Static scoping can do early binding (during compile time). Early binding increases efficiency.

Dynamic scoping requires late binding (during execution time). Late binding decreases efficiency as this binding needs to be done at runtime. (but it increases flexibility)

So, answer is (D)
• selected by
Answer:
Position:
Show:

Related questions

31 31 votes
5 answers 5 answers
12.9k
12.9k views
Ishrat Jahan asked Oct 29, 2014
12,853 views
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; ...
1 1 vote
1 answers 1 answer
2.7k
2.7k views
Kathleen asked Oct 5, 2014
2,656 views
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; ...
9 9 votes
3 answers 3 answers
8.6k
8.6k views
Kathleen asked Sep 23, 2014
8,576 views
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...
2 2 votes
2 2 answers
7.7k
7.7k views
Kathleen asked Sep 17, 2014
7,748 views
Consider the following class definitions in a hypothetical Object Oriented language that supports inheritance and uses dynamic binding. The language should not be assumed...