In C, when an array is passed to a function, is it passed by value or by reference?

  • By reference
  • By value
  • It depends on the array size
  • Not possible to pass arrays to functions
In C, arrays are passed to functions by reference, which means that changes made to the array inside the function affect the original array in the caller.
Add your answer
Loading...

Leave a comment

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