What is the difference between pass by reference and pass by
value?
Answer Posted / manila
Pass By Value:
1.It passes the actual value of parameter from the function
call.
2.Value of the parameter variable in calling functions
remains unchanged.
3.copy of the variable of actual parameter are made and
transfer to the formal parameter.
call By Reference:
1.the address of the actual parameter has to be transfered
2.the formal parameter in the function decleretion must of
pointer type.
3.Any changes in the formal parameter can change the value
of actual patameter.
| Is This Answer Correct ? | 30 Yes | 11 No |
Post New Answer View All Answers
write a C++ program for booking using constructor and destructor.
What is a superclass in oop?
What does <> mean pseudocode?
Why do we use class in oops?
What is class in oop with example?
What is class and example?
What are the three parts of a simple empty class?
What is destructor give example?
What are the two different types of polymorphism?
What is difference between inheritance and polymorphism?
How can you overcome the diamond problem in inheritance?
What is the main feature of oop?
Why is destructor used?
What is object in oop with example?
c++ program to swap the objects of two different classes