Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: coding dynamic allocation question |
| Date | 2014-04-19 19:19 -0700 |
| Organization | None to speak of |
| Message-ID | <lnfvl83fq6.fsf@nuthaus.mib.org> (permalink) |
| References | (2 earlier) <liuvd6$fv$1@dont-email.me> <lnoazw3khg.fsf@nuthaus.mib.org> <liv5fj$v5i$1@dont-email.me> <lnk3ak3gt0.fsf@nuthaus.mib.org> <liv9lu$lo5$1@dont-email.me> |
"Bill Cunningham" <nospam@nspam.invalid> writes:
> Keith Thompson wrote:
>> Yes, you're changing the value of the int from 20 to 10 using a
>> pointer. Yes, that's pointer manipulation. But it's not "pass by
>> value".
>
> Ok so I'm not passing by value then. Then what exactly is passing by
> value? Does it include pointer manipulation?
Passing by value is how C passes parameters to functions. The value of
the argument expression is passed to the function. If the argument is a
variable name, the function doesn't have access to the variable, just to
the value it had when the call was executed. And again, no, it doesn't
involve pointer manipulation, just copying a value.
The term applies only to function calls.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
coding dynamic allocation question "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-18 22:25 -0400
Re: coding dynamic allocation question Malcolm McLean <malcolm.mclean5@btinternet.com> - 2014-04-19 04:06 -0700
Re: coding dynamic allocation question "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-19 19:04 -0400
Re: coding dynamic allocation question Barry Schwarz <schwarzb@dqel.com> - 2014-04-19 16:52 -0700
Re: coding dynamic allocation question Keith Thompson <kst-u@mib.org> - 2014-04-19 17:36 -0700
Re: coding dynamic allocation question "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-19 20:47 -0400
Re: coding dynamic allocation question Keith Thompson <kst-u@mib.org> - 2014-04-19 18:55 -0700
Re: coding dynamic allocation question "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-19 21:59 -0400
Re: coding dynamic allocation question Keith Thompson <kst-u@mib.org> - 2014-04-19 19:19 -0700
Re: coding dynamic allocation question "Bill Cunningham" <nospam@nspam.invalid> - 2014-04-19 22:47 -0400
Re: coding dynamic allocation question Keith Thompson <kst-u@mib.org> - 2014-04-19 20:18 -0700
Re: coding dynamic allocation question Richard <rgrdev_@gmail.com> - 2014-04-20 11:00 +0100
Re: coding dynamic allocation question rescattered@gmail.com - 2014-04-20 05:25 -0700
Re: coding dynamic allocation question rescattered@gmail.com - 2014-04-20 05:42 -0700
Re: coding dynamic allocation question Richard <rgrdev_@gmail.com> - 2014-04-19 14:57 +0100
Re: coding dynamic allocation question Ian Collins <ian-news@hotmail.com> - 2014-04-20 23:24 +1200
Re: coding dynamic allocation question Michael Angelo Ravera <maravera@prodigy.net> - 2014-04-19 16:19 -0700
csiph-web