Which of the following is NOT the part of the organization of C programming…

2023

Which of the following is NOT the part of the organization of C programming language Activation Record?

  1. A.

    Argument count

  2. B.

    Return address

  3. C.

    Local data

  4. D.

    Formal parameters

Attempted by 198 students.

Show answer & explanation

Correct answer: A

Concept

An activation record (also called a stack frame) is the block of memory a procedure call uses on the run-time stack. By the standard compiler-design model, it holds a fixed set of components: the return address (where to resume after the call), the actual/formal parameters passed to the procedure, the procedure's local data, temporary values, the saved machine status, and optional control/access links. Any item that is not one of these standard run-time-stack components is not part of the activation record.

Application

Test each offered item against the standard component list:

  • Return address — part of the saved machine status; it records where control returns after the call, so it is a standard component.

  • Local data — the storage for the procedure's local variables, an explicit standard component.

  • Formal parameters — the parameter slots that receive the arguments; parameter storage is a standard component.

  • Argument count — there is no field that stores how many arguments were passed; the parameters themselves are stored, not a separate counter, so this is the item that is not a standard component.

Cross-check

Three of the four items map directly onto named components of the standard stack frame, leaving exactly one that has no place in the activation-record layout — consistent with the question asking for the single item that is NOT part of it.

Explore the full course: Niacl Ao It Specialist