What is the difference function call by value & function
call by reference?
Answer Posted / rahul
In call by value function, the value of the actual
parameters or arguments from calling function is passed on
to the called functions i.e. actual value is copied into the
formal parameters of called function. The arguments passed
may be variables of any data type or constants also.
In call by reference, the address of actual parameters are
passed on to the called functions from calling functions.
So, the values stored in these memory locations can be
altered, which is reflected in calling functions also.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is pointers in c with example?
What are the 4 types of organizational structures?
What is assignment operator?
while initialization of array why we use a[][2] why not a[2][]...?
Explain the use of #pragma exit?
What do you understand by normalization of pointers?
What is the acronym for ansi?
If errno contains a nonzero number, is there an error?
What does c mean in basketball?
What is the difference between a free-standing and a hosted environment?
What is wrong with this code?
What is pass by reference in functions?
Should I learn data structures in c or python?
What is function pointer c?
Is file a keyword in c?