Brief call by value and call by reference in detail. (MAY 2009)
Call by value:
In call by value the value of the actual arguments are passed to the formal arguments and the operation is done on formal arguments.
Example program:
· To send two integer values using “call by value”.
Call by reference:
In call by reference the address of actual argument values are passed to formal argument values.
Example program:
· To send a value by reference to user defined function.
Call by value:
In call by value the value of the actual arguments are passed to the formal arguments and the operation is done on formal arguments.
Example program:
· To send two integer values using “call by value”.
Call by reference:
In call by reference the address of actual argument values are passed to formal argument values.
Example program:
· To send a value by reference to user defined function.
No comments:
Post a Comment