C Language – Function Arguments Using Pointers
1. Function Arguments in C Programming languages pass function arguments using either Call by Value or Call by Reference . However, in C, function arguments are always passed by Call by Value . In other words, the value passed to a function is a copy , so the function cannot directly access the original variable. For this reason, C achieves a Call by Reference effect by using pointers to pass a variable's address as a value. 1.1. Function Argument Passing Methods Method What is passed Can change original Call by value The variable's value No Call by reference The variable's address Yes 1.1.1. Call by Value Call by Value is a method that passes a copy of the value to the function . Therefore, even if the value is changed inside the function, the original variable is not affected. 1.1.2. Call by Reference Call by Reference is a method that uses a pointer to...