• S
    SwaseekhGATE Preparation
General
  • Dashboard
  • Syllabus
  • Questions
  • Aptitude
  • Mock Tests
  • TCS NQT 2026
Account
  • Pricing
  • Contact
  1. GATE CS
  2. PYQs
  3. Computer Organization and Architecture

A certain processor supports only the immediate and the direct addressing modes. Which of the following programming language features cannot be implemented on this processor? (Choose all that apply) A. Pointers B. Arrays C. Records D. Recursive procedures with local variables

GATE 1999 · Computer Organization and Architecture · Addressing Modes · medium

Answer: A (Pointers) and D (Recursive procedures with local variables) cannot be implemented.

  1. Analyze Pointers: A pointer holds an address computed at run time. Dereferencing it means: go to the address stored in this variable and read/write there. This requires indirect (register-indirect) addressing. The processor only has immediate and direct modes — neither can dereference a run-time computed address. Therefore, pointers CANNOT be implemented.
  2. Analyze Arrays: A statically allocated array has elements at fixed, compile-time-known addresses. Each element can be accessed via direct addressing (LOAD arr[0], LOAD arr[1], etc.). Dynamic/heap arrays would need indirect mode, but statically declared arrays CAN be implemented with direct addressing.
  3. Analyze Records (Structs): A statically allocated record (struct) has fields at fixed, compile-time-known offsets from a known base address. All field accesses reduce to direct addressing. Records CAN be implemented with direct addressing.
  4. Analyze Recursive Procedures with Local Variables: Recursion creates multiple active instances of a procedure simultaneously. Each instance's local variables live in a new stack frame at run-time-determined addresses (SP + offset). Accessing them requires base-register or stack-relative addressing. With only immediate and direct modes (fixed addresses), you cannot access locals whose addresses are only known at run time. Therefore, recursive procedures with local variables CANNOT be implemented.