C++ Programming - Constructors and Destructors - Discussion
Discussion Forum : Constructors and Destructors - General Questions (Q.No. 10)
10.
Copy constructor must receive its arguments by __________ .
Discussion:
12 comments Page 2 of 2.
Susil Kumar Rout said:
1 decade ago
We can pass arguments to functions in two ways-
1)Pass by value(Call by value)
2)Pass by reference(Call by reference)
In case of Pass by value we pass the arguments to the called function by the value only.So any change in called function will not affect the calling function.
But in case of pass by reference we pass address to the calling function.So any change in the arguments of called function will affect to the calling function.
1)Pass by value(Call by value)
2)Pass by reference(Call by reference)
In case of Pass by value we pass the arguments to the called function by the value only.So any change in called function will not affect the calling function.
But in case of pass by reference we pass address to the calling function.So any change in the arguments of called function will affect to the calling function.
Abarna said:
1 decade ago
Please tell me the difference between pass by value and pass by reference.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers