subject

The following questions refer to the skeletal C++ program shown below. (a) Assume that static scoping is used. List all variables, along with the functions in which they are declared, that are visible at Line 1 in the program.
(b) Repeat part (a), but list the variables that are visible at Line 2.
(c) Repeat part (a), but list the variables that are visible at Line 3.
(d) Repeat part (a), but list the variables that are visible at Line 4.
(e) Repeat part (a), but list the variables that are visible at Line 5.
(f) Assume that dynamic scoping is used, and that main calls f1, which calls f2. (Assume that f1 calls f2 on Line 3.) List all variables, along with the functions in which they are declared, that are visible at Line 5 in the program.
void fl ();
void f2();
int a, b, c;
int main()
{int a, b, d; ...
//Line 1}
void fl()
{int d, e;
if (...)
{int a, b; ...
//Line 2} ...
//Line 3}
void f2()
{int a, c; if (...)
{int b, c; ...
//Line 4} ...
//Line 5}
Here's an example of the format that you should use for your answers: a (global), d (declared in fl), e (declared in if block in fl)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:30
Complete the sentence based on your knowledge of the professional difficulties faced by music artists. digital technology allows audiences to see free live telecasts of music or dance performances through
Answers: 1
question
Computers and Technology, 23.06.2019 01:50
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors.java.
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 23.06.2019 21:10
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
You know the right answer?
The following questions refer to the skeletal C++ program shown below. (a) Assume that static scopi...
Questions
question
Mathematics, 20.07.2019 18:30
Questions on the website: 13722360