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
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
Is data hiding and abstraction same?
What is the difference between procedural programming and oops?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
Can an interface inherit a class?
What is destructor give example?
How do you answer polymorphism?
What is the real life example of polymorphism?
what are the realtime excercises in C++?
What is polymorphism and its types?
What makes a language oop?
What is oops and its features?
What are the 4 pillars of oop?
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?