Questions tagged [byref]
182 questions
-4
votes
1 answer
JavaScript By Reference Object
I have code which is similar to
emp1 = emp;
emp= emp2;
if objects are by reference then why emp1 is not equal to emp2?
why emp1 prints "shilpa" instead of "manish" .
var emp =
{
name : "manish",
number : 10
}
var…

Manish
- 1,246
- 3
- 14
- 26
-5
votes
1 answer
C++ Programming ( advantages of by ref & by val) query? / methods of editing struct other than byRef
I am going over a mock exam in revision for my test, and one question on the paper confuses me.
Q.)An application is required to pass a structure to a function, which will modify the contents of the structure such that on return from the function…

RNewell122
- 128
- 10