1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Bas_tet [7]
3 years ago
5

Consider the following skeletal C-like program:

Computers and Technology
1 answer:
Wewaii [24]3 years ago
4 0

Answer:

In dynamic scoping the current block is searched by the compiler and then all calling functions consecutively e.g. if a function a() calls a separately defined function b() then b() does have access to the local variables of a(). The visible variables with the name of the function in which it was defined are given below.

Explanation:

a. main calls fun1; fun1 calls fun2; fun2 calls fun3

Solution:

  • Visible Variable:  d, e, f         Defined in: fun3
  • Visible Variable: c                  Defined in: fun2 ( the variables d and e of fun2 are not visible)
  • Visible Variable: b                  Defined in: fun1 ( c and d of func1 are hidden)
  • Visible Variable: a                  Defined in: main (b,c are hidden)

b. main calls fun1; fun1 calls fun3

Solution:

  • Visible Variable:  d, e, f          Defined in: fun3
  • Visible Variable:  b, c              Defined in: fun1 (d not visible)
  • Visible Variable:  a                 Defined in: main ( b and c not visible)

c. main calls fun2; fun2 calls fun3; fun3 calls fun1

Solution:

  • Visible Variable:  b, c, d         Defined in: fun1
  • Visible Variable:  e, f              Defined in: fun3 ( d not visible)
  • Visible Variable:  a                 Defined in: main ( b and c not visible)

Here variables c, d and e of fun2 are not visible .

d. main calls fun1; fun1 calls fun3; fun3 calls fun2

Solution:

  • Visible Variable: c, d, e        Defined in: fun2
  • Visible Variable:  f                Defined in: fun3 ( d and e not visible)
  • Visible Variable:  b              Defined in: fun1 ( c and d not visible)
  • Visible Variable: a                Defined in: main ( b and c not visible)
You might be interested in
How can you enter Task Manager in Windows? Select 3 options. press Ctrl + Shift + Tab press Ctrl+Alt+Delete and then click Task
Sophie [7]

Answer:

Please find the 3 options below.

Explanation:

To begin with, Task Manager in windows, is a monitor program that provides information or shows application and processes running on a computer. Task manager also provide insights about the general status of a computer. The three options for entering or accessing task manager in windows are:

1. Press Ctrl+Alt+Delete and then click Task Manager

2. Right-click the taskbar and choose Start Task Manager

3. Right-click the taskbar and choose Manage Tasks

5 0
4 years ago
The way that text and images are arranged on a slide is called _________. A. Layout B. Background C. Style D. Charting
Mademuasel [1]
It is called a layout.
8 0
4 years ago
Read 2 more answers
Any Body have a zoom class goin on<br> i wanna bomb
Norma-Jean [14]

This site is only for education related questions. You should only answer or ask questions. That's what we are here for. Whoever is reading this answer, please spread it to stop people from zooming, hurting others, or just posting non-related to education questions. Thank you.

6 0
3 years ago
What does the windows update feature allow you to do?
Mariulka [41]
The answer is D
Explanation: none
3 0
3 years ago
Read 2 more answers
How many types of window in Qbasic​
Pachacha [2.7K]

Answer:

The QBasic Editor Screen has three parts. They are- Editor Window, Immediate Window and Output Window.

7 0
3 years ago
Other questions:
  • A hacker changing the ip addresses used in conjunction with a particular company’s web site to re-route them to the hacker’s ser
    11·1 answer
  • What three conditions must be satisfied in order to solve the critical section problem?
    13·1 answer
  • HELP 10 POINTS AND BRAINLIEST FOR BEST ANSWER! EASY I PROMISE! HELPFUL ANSWERS ONLY PLEASE HURRY!
    14·2 answers
  • How many bytes are there in 256 Kbytes?
    6·1 answer
  • What is the best platform for a online meeting?
    10·2 answers
  • Identify the type of error described
    6·1 answer
  • A browser is an example of a. :
    7·1 answer
  • How do entrepreneurs traditionally use computers? check all of the boxes that apply.​
    13·2 answers
  • What is the launching of a 3-D map called?
    12·1 answer
  • Which feature of cryptography is used to prove a user's identity and prevent an individual from fraudulently reneging on an acti
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!