Hi all
In c we can pass the parameters in a function in two different ways.
1. pass by value
2. pass by reference
pass by value
pass by reference
what is Difference between pass by value and pass by reference. I have seen some example on internet but for better understanding if someone can help with example. it would much appreciated
In c we can pass the parameters in a function in two different ways.
1. pass by value
2. pass by reference
pass by value
Code:
void PassByValue(int value)
{
// code
}
Code:
void PassByReference(int* reference)
{
//code
}