summaryrefslogtreecommitdiffhomepage
path: root/c.html.markdown
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2013-08-31 17:04:47 -0500
committerLevi Bostian <levi.bostian@gmail.com>2013-08-31 17:06:16 -0500
commit41f65bb3415e7002ef171c351376c1c4d5336746 (patch)
tree62310c28e953c0233e8e02b026d188a9875e59fa /c.html.markdown
parent79fdd62c6bcb13c550050efe02d6753d198a5a83 (diff)
Clarified function call by value description.
Diffstat (limited to 'c.html.markdown')
-rw-r--r--c.html.markdown8
1 files changed, 6 insertions, 2 deletions
diff --git a/c.html.markdown b/c.html.markdown
index 75025b0c..e6e2559e 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -433,8 +433,12 @@ int getInt(char w) { //parameter name does not need to match function prototype
}
/*
-Functions are pass-by-value, but you can make your own references
-with pointers so functions can mutate their values.
+Functions are call by value. So when a function is called, the arguments passed
+to the function are copies of original arguments (except arrays). Anything you
+do to your arguments do not change the value of the actual argument where the
+function was called.
+
+You can use pointers if you need to edit the original argument values.
Example: in-place string reversal
*/