Click here to Skip to main content
15,920,633 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
what is value and what is reference?
why enum is value type and why array is reference type?
difference between value and reference?
Posted

Whenever we talk of holding a pointer to a location where the value is stored, we are talking about a reference. By value is when we are directly working with that value - no pointer or reference involved.
 
Share this answer
 
Check in here[^]. This is largely for C# but the rules are the same.
 
Share this answer
 
These are questions that are easily answered by Google. Try pasting your questions on Google one by one.
 
Share this answer
 
 
Share this answer
 
When passing a value, the receiving function gets a copy of the value.

When passing a reference, the receiving function gets an address where the value is stored.

The difference is that when the function modifies the value and returns, the modified value is just discarded (by value) or remains in effect (by reference).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900