Top "Pass-by-reference" questions

Pass by reference is an argument marshalling strategy whereby a variable's location in memory is passed to a function, rather than a copy of the variable's value, although the function appears in the source code to receive the variable itself rather than a pointer to it.

Pass an array to a function by value

Below is a snippet from the book C Programming Just the FAQs. Isn't this wrong as Arrays can never be …

c arrays function pass-by-reference pass-by-value
Java : Best way to pass int by reference

I have a parsing function that parses an encoded length from a byte buffer, it returns the parsed length as …

java pass-by-reference
Passing values in Python

When you pass a collection like list, array to another function in python, does it make a copy of it, …

python pass-by-reference pass-by-value
Swift: Pass array by reference?

I want to pass my Swift Array account.chats to chatsViewController.chats by reference (so that when I add a …

arrays swift pass-by-reference
Is Swift Pass By Value or Pass By Reference

I'm really new to Swift and I just read that classes are passed by reference and arrays/strings etc. are …

swift pass-by-reference pass-by-value pass-by-pointer
Does C++ pass objects by value or reference?

A simple question for which I couldn't find the answer here. What I understand is that while passing an argument …

c++ pass-by-reference pass-by-value pass-by-pointer
javascript pass object as reference

i have a object, which is getting passed in many different functions inside a function. these functions may or may …

javascript variables object reference pass-by-reference
python pandas dataframe, is it pass-by-value or pass-by-reference

If I pass a dataframe to a function and modify it inside the function, is it pass-by-value or pass-by-reference? I …

python pandas pass-by-reference pass-by-value
Difference between function arguments declared with & and * in C++

I typed the following example: #include <iostream> double f(double* x, double* y) { std::cout << "val …

c++ function pointers pass-by-reference
Passing optional parameter by reference in c++

I'm having a problem with optional function parameter in C++ What I'm trying to do is to write function with …

c++ pass-by-reference optional-parameters