Top "Pass-by-value" questions

pass-by-value is a "one way passing" so that modifications of the passed value inside the receiving function (or other entity like process, etc) are not returned back.

Performance cost of passing by value vs. by reference or by pointer?

Let's consider an object foo (which may be an int, a double, a custom struct, a class, whatever). My understanding …

c++ pointers pass-by-reference pass-by-value pass-by-pointer
What exactly is the difference between "pass by reference" in C and in C++?

The phrase "pass by reference" is used by C and C++ developers alike but they appear to be used to …

c++ c terminology pass-by-reference pass-by-value
Pass by value faster than pass by reference

I made a simple program in c++ to compare performance between two approaches - pass by value and pass by …

c++ pass-by-reference pass-by-value
How to pass a variable by value to an anonymous javascript function?

The Objective I want to dynamically assign event handlers to some divs on pages throughout a site. My Method Im …

javascript closures pass-by-reference anonymous-function pass-by-value
Java is NEVER pass-by-reference, right?...right?

Possible Duplicate: Is Java “pass-by-reference”? I found an unusual Java method today: private void addShortenedName(ArrayList<String> voiceSetList, …

java pass-by-reference pass-by-value
Why is the copy constructor called when we pass an object as an argument by value to a method?

Why is the copy constructor called when I pass an object as an argument by value to a function? Please …

c++ copy-constructor pass-by-value
Isn't "const" redundant when passing by value?

I was reading my C++ book (Deitel) when I came across a function to calculate the volume of a cube. …

c++ constants pass-by-value
pass by reference and value with pointers

I don't understand why passing a pointer to a function doesn't change the data being passed in. If the function …

c++ pass-by-reference parameter-passing pass-by-value
Pass by reference or pass by value?

When learning a new programming language, one of the possible roadblocks you might encounter is the question whether the language …

language-agnostic oop parameters pass-by-reference pass-by-value
Call by reference, value, and name

I'm trying to understand the conceptual difference between call by reference, value, and name. So I have the following pseudocode: …

pass-by-reference pass-by-value pass-by-name