Question

A) Does subroutine know whether it will be part of a nested subroutine call or not...

A) Does subroutine know whether it will be part of a nested subroutine call or not ?

Homework Answers

Answer #1

Subroutine nesting is a programming practice In which one subroutine call another subroutine. A subroutine does not know if its a part of another subroutine. The link register holds the return address of the currently calling subroutine. This is done using the stack data structure when nested calls are involved. So, when a nested call is made to a subroutine, its address is added to the stack data structure. This is how stack memory works.

The diagram below shows this representation. The subroutine does not know whether it will be a part of a nested subroutine call or not since only one subroutine is being processed at a time, which is managed by the stack memory.

  

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
where does the fetch part of the cycle get its instruction from? how does it know...
where does the fetch part of the cycle get its instruction from? how does it know exactly ehere to go? explain your answer in deatil
Does the non-archimedean field R(t) satisfy the Nested Interval Property? Explain. Note that R(t) elements are...
Does the non-archimedean field R(t) satisfy the Nested Interval Property? Explain. Note that R(t) elements are rational functions in the variable t with coefficients in R. We take the ratio of polynomials to create the elements.
7. (True/False): Nested procedure calls are not permitted by the Microsoft assembler unless the NESTED operator...
7. (True/False): Nested procedure calls are not permitted by the Microsoft assembler unless the NESTED operator is used in the procedure definition. 15. What will be the final value in EAX after these instructions execute? push 5 push 6 pop eax pop eax 3. Which instruction pops the stack into the EFLAGS register? 17. Which statement is true about what will happen when the example code runs? 1: main PROC 2: mov eax,30 3: push eax 4: push 40 5:...
Define a nested list type in OCaml where a node is either an element, or a...
Define a nested list type in OCaml where a node is either an element, or a list of nodes. (That is, write the OCaml code for this new data type.) You may use the built-in data type list as part of your definition.
Tell whether the following call for a right-tailed, left-tailed, or two-tailed alternative hypothesis: A worker is...
Tell whether the following call for a right-tailed, left-tailed, or two-tailed alternative hypothesis: A worker is testing whether the strength of a bolt exceeds the industry requirements. A chef wants to know whether there is a change of opinion on his food after making some minor adjustments to the recipes. A state official wants to test whether the changes of winning a lottery are less than advertised. 4. A chemist believes a new compound he’s discovered will speed up certain...
Call feature? Who does a call feature benefit Please answer it in bond area
Call feature? Who does a call feature benefit Please answer it in bond area
Suppose that we want to know the mean income of residents in Brazos County. Call this...
Suppose that we want to know the mean income of residents in Brazos County. Call this mean income μY. We cannot afford to survey every person in Brazos County, so we decide to randomly select 100 people and ask their income. This yields a sample of 100 random variables {Y1, Y2, ..., Y100}. You suggest taking the sample average of all 100 observations as your estimate of ^μY . Your statistics friend suggests taking the 37th observation (Y37) as his...
does the current flow in the same direction for the charging and discharging part? ( how...
does the current flow in the same direction for the charging and discharging part? ( how do you know) why are they in the same/opposite direction? thank you
Discuss whether or not differentiating between a conversion and call is necessary for how we interpret...
Discuss whether or not differentiating between a conversion and call is necessary for how we interpret Paul’s letters in the bible?
A company introduced a new product into the market and is interested to know whether it...
A company introduced a new product into the market and is interested to know whether it has some market (monopoly) power. You are assigned to determine whether the company has a market power in the industry. You reviewed the available information about the company and you have learned that the company produces a somewhat unique product that sells for $12 per unit, and the marginal cost is $7.00. Does the company have a market power? Why? Explain to the manager...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT