Bird
0
0

In ARM, a function expects four parameters but the caller passes only three. What happens to the unused register?

medium📝 Analysis Q7 of 15
ARM Architecture - Subroutines and Stack
In ARM, a function expects four parameters but the caller passes only three. What happens to the unused register?
AThe unused register is used to pass the return address
BThe unused register is cleared to zero automatically
CThe unused register causes a runtime error
DThe unused register remains unchanged and ignored
Step-by-Step Solution
Solution:
  1. Step 1: Understand parameter passing behavior

    Registers not used for parameters remain unchanged by the caller.
  2. Step 2: Effect on unused registers

    Unused parameter registers are ignored and keep their previous values.
  3. Final Answer:

    The unused register remains unchanged and ignored -> Option D
  4. Quick Check:

    Unused param registers unchanged [OK]
Quick Trick: Unused parameter registers keep old values [OK]
Common Mistakes:
  • Assuming registers are zeroed
  • Expecting runtime errors
  • Confusing with return address register

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More ARM Architecture Quizzes