\t\t\tBasicA copy of the variable is passed.A variable itself is passed.EffectChange in a copy of variable doesn\'t modify the original value of variable out side the function.Change in the variable affect the value of variable outside the function also.Calling Parametersfunction_name(variable_name1, variable_name2, . . . .);function_name(&variable_name1, &variable_name2, . . . .); //in case of object object.func_name( object);Receiving Parameterstype function_name(type variable_name1, type variable_name2, . . . .) { . . }type function_name( type *variable_name1, type *variable_name2, . . . .){ . . } //in case of object type function_name(class_type object_name) { . . }Default callingprimitive type are passed using "call by value".objects are implicitly passed using "call by reference".\t
1.

What is diffrence between call by value and call by referance

Answer» BASIS FOR COMPARISON CALL_BY_VALUE CALL BY REFERENCE


Discussion

No Comment Found