Answer the following questions true (T) or false (F)

1. Each activation frame contains all the function’s code, as well as the automatic variables and formal parameters.

2. The activation frames in nested function calls are handled in a last-in/ first-out order.


1. False
Explanation: There is only one copy of the function’s code. The activation record contains the local variables and parameters created at each invocation of the function.But you can think of the activation frame as containing the functions code. The text does say only one copy but the discussion is almost as if there is a copy on each activation frame as a useful fiction.
2. True
Explanation: Suppose function A calls function B, calls function C. The A’s activation record is placed on top of the A’s caller’s activation record. B’s activation record is placed on top of A’s and C’s is placed on top of A’s. When A returns, its activation record is removed from the stack, and when B returns, its activation record is removed, and so on. All this in last-in-first-out order.

Computer Science & Information Technology

You might also like to view...

The frame size of a video refers to the video’s _____.

A. aspect ratio B. pixel aspect ratio C. resolution D. ppi

Computer Science & Information Technology

You can use the unset() function to remove array elements and other variables.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

_____ represent one or more physical storage locations for photos stored locally on the computer.

A. ?Collections B. ?Folders C. ?Albums D. Apps

Computer Science & Information Technology

Compare sepal length, sepal width, petal length, and petal width, using Figure 3.12.

What will be an ideal response?

Computer Science & Information Technology