answersLogoWhite

0


Best Answer

Call by value essentially passes a copy of an object's value whereas call by reference essentially passes the object itself. Pass by reference is the preferred method whenever possible as call by value will automatically invoke the object's copy constructor, which is often unnecessary, especially if the object is not affected by the function call (pass by constant reference).

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Explain the passing parameters as function in Call by Value and Call by Reference and then distinguish between them?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Distinguish between hypotheses that explain biodiversity and those that explain the origin of life?

Distinguish between hypotheses that explain biodiversity and these that explain the origin of life?


Explain with the help of an example the concept of pass by value and pass by reference?

A reference type is a type which has as its value a reference to the appropriate data rather than the data itself. For instance, consider the following code: StringBuilder sb = new StringBuilder();By default, parameters are value parameters. This means that a new storage location is created for the variable in the function member declaration, and it starts off with the value that you specify in the function member invocation. If you change that value, that doesn't alter any variables involved in the invocation. For instance, if we have:void Foo (StringBuilder x){ x = null; }StringBuilder y = new StringBuilder();y.Append ("hello"); Foo (y);Console.WriteLine (y==null);


What is fet and parameter of fet?

explain all the parameters of fet


What is an antonym for confound?

Analogy, explain, or simplify.


Explain the different access storage specifiers available in c?

The storage class specifiers in C and C++ are:autoexternmutableregisterstatictypedefA storage class specifier is used to refine the declaration of a variable, a function, and parameters


Explain OSI reference model with revant diagram?

Explain OSI reference model with revant diag


What is the purpose of a reference point?

A reference point helps to explain why we are, where we are.


When format command is typed into a command promt what parameters can be added along with it explain each parameters?

On the system you are referring to type "format /?" to get the commands and syntax.


Define and distinguish between entries on the books and entries on the workpapers and explain why such an entries on the books and on the workpapers are required in the consolidation process?

what is distinguish between bookkeeping and accounting? what is distinguish between bookkeeping and accounting? what is distinguish between bookkeeping and accounting?


Explain why a function at most one y-intercept?

explain why a function has at most one y-intercept


What are the limitations of h parameters?

Explain the transient response of an inductive resistive and capacitive circuit for a DC connection


Identify and explain any 4 functions of groupware?

explain any 4 function of groupware?