answersLogoWhite

0

There are two ways to pass parameters to a method.

1) Pass by value

2) Pass by reference.(i.e. pass by pointers).

For here, I would say, whenever you required to change the properties/value of the parameter by the method you called you should the approach (2). ie. pass by pointers.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What are the three general methods for passing parameters to the operating system?

Stacks, pointers and registers


How do you call funstion through pointers?

name ( parameters )


Can you overload object pointers?

Overloading refers to defining multiple functions of the same name with different numbers/types of parameters. So no, you cannot overload a pointer.


Describe three general methods for passing parameters to the operating system?

1) Pass parameters using registers(directly). 2) Store the parameters in a table in memory and the table address is passed in a register to the OS. 3) Push(store) the parameters onto a stack(by the program) and "pop" off by the Operating System.


What is meant by passing function to another function in c plus plus?

Just as pointers can point to variables, pointers can also point to functions. Thus you can pass function pointers to functions. In so doing, you can alter the behaviour of the function by having it call dynamically call arbitrary functions rather than just preset functions.


Is it possible to use two parameter passing methods?

The number of parameters is zero or more, so two is perfectly okay.


What is the purpose of passing of key in js prom?

none


What purpose of government is met by passing and enforcing laws?

Order


What parameters do you change in volume control ventilation to increase expiratory time?

what is the purpose of a heated wire circuit


What is the purpose of CFD analysis?

CFD stand for computational fluid dynamics. Basically, the purpose of CFD analysis is to determine some specific parameters that are needed for a project.


Does passing static strings as parameters to a method create a copy of the String or passes its reference?

Java always follows a pass by value approach.


What are void pointers?

They are pointers without type