Posts

Showing posts with the label call by value and call by reference in pointers

call by value, pointer, reference

 Call By Value, Pointer, References Here in this post, we have discussed the different parameter which we are pass in our user-defined function. The above all parameters are used for different situations. Call by value, call by reference, and call by pointer are three basic parameters which we often use in our function. Note : If we don't change our value and only we want to change its duplicate value then we only pass the call by value parameter in our functions. And if we want to change the original value of our data then we will pass by the pointer or pass by the references.   Call By Value Call By Reference While calling a function, we pass the copy of the values of variables to it. Such functions are known as “Call By Values”. While calling a function, instead of passing the values of variables, we pass the address of variables(location of variables) to the function known as “Call By References. In this method, the value of each variable in the calling function is copied ...