what is advantages and disadvantages in call by value and
call by reference
Answers were Sorted based on User's Feedback
Answer / shashank and nishant
In call by reference the the object will get change.
In calle by value it won't.
call by reference passes the address of the argument into
the required subroutine, thenh when it is altered in the
subroutine, its altered value will overwrite the original
argument value.
call by value only passes the value to the subroutine(i.e.
the subfunction defined)and this does not overwrite the
argument value.
Is This Answer Correct ? | 53 Yes | 13 No |
Answer / nirmalafredrick
You need to say simply
Call by value allows duplication
Call by referance No Duplication
May be if they ask for example you may say what shashank
had written
Is This Answer Correct ? | 27 Yes | 7 No |
Answer / rishav
It copies the value of actual parameters into formal parameters.
The changes are not reflected back to the original value.
It creates its own copy of argument values and then uses them.
Passing by values is useful when the original values are not to be changed.
Is This Answer Correct ? | 10 Yes | 6 No |
Answer / mukesh
In call by value method-The copy of variables are passed into the function and it does not overwrite the original values declared in main function. It consumes much space than call by reference method
In call by reference method- The address of variables are passed into the function and it will overwrite the original values declared in main function. It consumes less space the call by value method.
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / shivam sharma
when formal arguments are ordinary variables then it is called function call by passing value.
and when formal arguments are pointer variables then it is called function call by passing address.
when formal arguments are reference variable then it is called function call by passing reference.
most of the times people considers call by reference and call by address is same but it's not.it is unique in different context.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / deepak gupta
call by refernce for retwrning more then one valve.
Is This Answer Correct ? | 3 Yes | 5 No |
Answer / bala
call by value ----- represent values
call by value ----- for represent the address
Is This Answer Correct ? | 19 Yes | 24 No |
Answer / mohamed
In call by value the the object will get change.
In calle by reference it won't.
Is This Answer Correct ? | 5 Yes | 35 No |
How do you find number of records present in internal table?
what is OSS?please answer if anybody knows
Explain the different types of screen keywords?
What are base tables of an aggregate object?
8) What are the compulsary values in RESUSE_LIST_DISPLAY and RESUSE_LIST_GRID?
If i double click on any sales order no it sud take me to the transaction how?
What are the steps to execute session method?
how to debug the program based on the user
How to use messages in lists?
How to validate the entry in Screen & dialog proframming?? Is there any way to send the error??
which state ment is used to move identically named fields between structures?
how to make split command reusable?