mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-17 20:11:57 +02:00
Updated pass-by-reference bit in c tutorial. Fixes #31
This commit is contained in:
@@ -297,8 +297,8 @@ int add_two_ints(int x1, int x2){
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Pointers are passed-by-reference (duh), so functions
|
Functions are pass-by-value, but you can make your own references
|
||||||
can mutate their values.
|
with pointers so functions can mutate their values.
|
||||||
|
|
||||||
Example: in-place string reversal
|
Example: in-place string reversal
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user