answersLogoWhite

0

In some programming languages, like C, you can pass the new method (or function) an address pointer to the first element in the array. As long as you don't leave the scope of the method the array was created in, the array will remain valid.

In other languages that don't support memory addresses, like FORTRAN, it must be done by making the array global.

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Math & Arithmetic

What is the Difference between implicit and explicit variable declaration?

Implicit and explicit determine what can be passed to a method. If a method is not declared as explicit the compiler will attempt to look for any implicit conversions from the type being passed to the type the method expects. for example, if the method expects a long and you pass in an unsigned char, the compiler will not complain because an unsigned char can be implicitly converted to a long without any loss of data. If you declare the method as explicit the data type that is used in the method declaration is the data type that needs to be passed to the method. If you want to pass a char *ptr to a method that expects a long you will have to cast the char *ptr to a long when calling the method. For example, foo((long)ptr);


What is the technique for leucophoresis?

leucapheresis - blood is withdrawn through a vein and passed through a cell separator machine. white cells are removed and the rest of the blood is returned to the patient through another vein. this method can be usd to collect peripheral blood stem cells from a patient.


What is another way to represent four cows died?

four cows passed away


What are the advantages and disadvantages of historical method of research?

An advantage is that it enables researchers to learn about events that happened in the passed or long ago and also provides a way to study trends


How do you use the word method in a sentence?

there are two uses that I know of for methodone would be a way of doing something: "He taught me his method of cleaning the bathroom."the other is used in programming. "The string was passed to the findWord method."don't worry too much about the second one...

Related Questions

How do you send an array of strings with a signal in Dbus with Glib bindings?

Arrays are passed as arguments to method parameters. To pass a string array from one activity to another the code is [] stringArray = intent.getStringArrayExtra("string-array");.


How an array passed to a function?

Arrays should be passed by reference or by pointer, never by value (passing by value passes a copy of the reference, not the reference itself). The array length should also be passed to the function (by constant value) to prevent buffer overflows. Alternatively, in object-oriented languages, arrays can be wrapped in a class of object. Since the array is a member of the class, it doesn't need to be passed to the member methods, thus the function can become a member method of the class itself or a derivative of the class. Or the object containing the array can be passed to external functions by reference.


Which is better in structure or class?

It depends on your requirements. A structure contains other objects (variables) within it. You cannot write methods in a structure. It is used as a data storage mechanism. When passed as an argument to another method, the entire contents of the structure is copied (this means that any changes you make to the structure in that method only apply to the local copy). A class contains both objects (variables), and methods that interact on those variables. Classes are the fundamental building block of object orienated applications. When passed as an argument to another method, only the pointer (or memory location) of the object is passed to the method (this means that any changes you make to the object will be visible in the original method as well, since there is only one copy of it).


A packet on a network using the rip routing method has been passed from one connectivity device to another 15 times What happens when it gets passed to one more device?

a. It is discarded.


Why cannot arrays be passed by values to procedure?

Because C does not have procedures. Because in Java only elementary types (int, double, etc) are passed by-value, objects (array included) by-reference.


How do you pass an array as a parameter?

AnswerUnfortunately your question is to broad. All progamming languages vary in the way things are done. I will just give a general way of doing it.You have to pass the multidimensional array into the function by including it with calling the function. On the receiving end you have to declare another multidimensional array so the information can be passed into it. Depending on the language, you may not be passing in a multidimensional array, instead that array may be stored in an object which you can pass instead.Hope this helps some.-Ashat-in C, when passing two dimensional arrays the compiler needs to know the width so it can calculate memory offsets.passing a 2d array of width 4:voidFunc(type array[][4]);


A packet on a network using the RIP routing method has been passed from one connectivity device to another 15 times so what happens when it gets passed to one more device?

It is discarded because the maximum amount of hops is 15.


Object are passed to a method by use of a call -by- reference?

yes


When was Another Day Has Passed created?

Another Day Has Passed was created on 2009-05-12.


How do you pass a 2D array in a functions?

if you were to call a function you would write it as: function(array[][], int pretend, double pretend2); arrays will always be passed by reference, not by value.


Function of major calyx?

method by which urine is passed from he kidney to the bladder.


What is it called when java allows you to declare methods with the same name in a class?

Yes perfectly Legal Reason: The scope of a variable declared inside a method is only till the method's end. So by defining another variable of the same name inside a different method does not create any issues.