When a value is passed to a function by value, what is passed to the function?

  • A copy of the value
  • A pointer to the value
  • A reference to the value
  • The memory address of the value
When a value is passed to a function by value, a copy of the actual value is passed to the function. Changes made to the parameter inside the function do not affect the original value.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *