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 the difference between a constructor and a destructor?
What is destructor oops?
can inline function declare in private part of class?
What does enum stand for?
What is meant by multiple inheritance?
write knight tour problem which is present in datastructure
What are the 5 oop principles?
What is the difference between encapsulation and polymorphism?
What is abstraction in oops?
Why is polymorphism needed?
write a C++ program for booking using constructor and destructor.
What is object and example?
What is object and class in oops?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
What do you mean by overloading?