|
Notices |
![]() |
|
Thread Tools | Rate Thread | Display Modes |
![]() |
#1 |
Registered User
Join Date: Feb 2013
Location: Bangalore
Posts: 1,164
|
Difference between pass by referrin and pass by value
"Pass by value" creates a copy of an argument, ensuring changes within a function don't affect the original. Primitive types often use this. "Pass by reference" provides a direct link to the original argument's memory, allowing functions to modify it. Objects are typically passed this way. Essentially, value passing isolates changes, while reference passing allows them to persist. The key distinction lies in whether the function operates on a copy or the original data, impacting data preservation outside the function's scope. Language-specific implementations can vary.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|