6

Call-By-Value and Call-By-Reference

 2 years ago
source link: https://hackernoon.com/call-by-value-and-call-by-reference
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Call-By-Value and Call-By-Reference

There are two ways to pass data to the function in C/C++. Pass-By-Value and Pass-by-Reference are equally important features of C/CC++. The time complexity of programs using pass-by value and pass-By reference is almost similar. When to use Pass-BY-Value is when we want to calculate the value of a particular function without modifying the values of arguments passed. To avoid bugs caused due to memory stack issues, use pass-via-reference to update a variable's value.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK