What is the output of following program?
(C) Compiler Error
(D) Runtime Error
Explanation: Parameters are always passed by value in C. Therefore, in the above code, value of y is not modified using the function fun(). So how do we modify the value of a local variable of a function inside another function. Pointer is the solution to such problems. Using pointers, we can modify a local variable of a function inside another function. See the next question.
Note that everything is passed by value in C. We only get the effect of pass by reference using pointers.