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


Please Help Members By Posting Answers For Below Questions

What is the benefit of oop?

570


What is stream in oop?

837


what are the ways in which a constructors can be called?

1581


What is advantage of inheritance?

687


What type of loop is a for loop?

682






to find out the minimum of two integer number of two different classes using friend function

1639


can inline function declare in private part of class?

3655


What is the significance of classes in oop?

587


How do you explain polymorphism?

587


what's the basic's in dot net

1736


How to improve object oriented design skills?

569


How is class defined?

584


Describe these concepts: Polymorphism, Inheritance and Abstraction.

610


What is overriding in oop?

548


Where is pseudocode used?

563