Multiple choice

In argument passing by value,

  1. same variable is accessed in called function

  2. new variable is accessed in called function

  3. new object is created in memory

  4. both (2) and (3)

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

When passing arguments by value, a new copy of the variable is created and a new object is allocated in memory for the called function. The original variable remains unchanged in the caller's scope, so both statements (2) and (3) about new variable access and new object creation are correct.