explain call by value


Call by value: In c++by default a function call passes parameter by value.in this mechanism the values of actual parameters will be passed to a separate set of variables known as formal parameters. The formal parameters of type value parameters.Any change made to the formal parameters will not affect the corresponding actual parameters. Only one values to be returned from function.

Call by value is is used to call a function by its value. for example, if you to set the value of a as 20 and set the value of b as a then the value of b will be 20. Then If you change the value of a to 10 then the value of b will remain 20 only.


explain call by value


0 Comments