What is the difference between pass by reference and pass by
value?
Answer Posted / anwer sayed
Pass By Reference :
In Pass by reference address of the variable is passed to a
function. Whatever changes made to the formal parameter will
affect to the actual parameters
- Same memory location is used for both variables.(Formal
and Actual)-
- it is useful when you required to return more then 1 values
Pass By Value:
- In this method value of the variable is passed. Changes
made to formal will not affect the actual parameters.
- Different memory locations will be created for both variables.
Read more:
http://wiki.answers.com/Q/What_is_the_difference_between_pass_by_value_and_pass_by_reference_in_c#ixzz16MOpWSLk
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is difference between data abstraction and encapsulation?
What is an advantage of polymorphism?
What is and I oop mean?
How do you define social class?
How does polymorphism work?
What is oops and its features?
Why do we need oop?
What is multilevel inheritance explain with example?
Can you inherit a private class?
Why is oop useful?
What is class and object in oops?
What is cohesion in oop?
Why polymorphism is used in oops?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
Can a varargs method be overloaded?