In C, what is the effect of using pointers as function parameters with regards to pass by value and pass by reference?

  • Pointers can only be used in pass by value scenarios.
  • Pointers enable pass by reference.
  • Pointers enable pass by value.
  • Pointers have no impact on pass by value or pass by reference.
Using pointers as function parameters in C enables pass by reference. When a pointer to a variable is passed to a function, changes made to the variable within the function are reflected outside the function, similar to pass by reference.
Add your answer
Loading...

Leave a comment

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