Question & Answer: QUESTION 25 An activation record stores O the command that allows a function to activate. an…..

QUESTION 25 An activation record stores O the command that allows a function to activate. an address for function. O where the function returns and its local variables and parameters. the record of how inherited classes relate to each other.
media%2Fe46%2Fe46fcff9-0474-44d5-9eb7-e1

QUESTION 25 An activation record stores O the command that allows a function to activate. an address for function. O where the function returns and its local variables and parameters. the record of how inherited classes relate to each other.

Expert Answer

 

Answer 1 : An activation store where the function returns and its local variables and parameters.

Description : An activation record is nothing but a stack frame where following value can be store. it is used while invoking function call in language like c or cpp etc.
1. Function return value
2. Parameters
3. local data
4. temporary data

Answer 2 : In order to write RPN calculator one needs to declare a single statck capable of holding the numbers.

Description :

i.e We can take on example to understand the above answer If i say we have expression for calculation like 1 + 2
then so first we need to convert this expression to post fix notation like 12+ .
Now we have one stack to store this post fix notation to store the number till the operator comes
like first number 1 will get inserted into stack then number 2 will get added in LIFO ( last in first out ) maner and when + will come for insertion then we will get the numbers back from statck and perform addition so 1 + 2 = 3 will be the result.

Still stressed from student homework?
Get quality assistance from academic writers!