Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site dciem.UUCP Path: utzoo!dciem!ntt From: ntt@dciem.UUCP (Mark Brader) Newsgroups: net.lang.c Subject: Re: & operator - (nf) Message-ID: <562@dciem.UUCP> Date: Fri, 16-Dec-83 17:53:05 EST Article-I.D.: dciem.562 Posted: Fri Dec 16 17:53:05 1983 Date-Received: Fri, 16-Dec-83 20:00:08 EST References: <1974@fortune.UUCP> Organization: NTT Systems Inc., Toronto, Canada Lines: 18 I would have to disagree with chris as to what should be assigned by: char *in, *out, buf[]; in = buf; out = &(*in++); since he forgot the parentheses. Given the parentheses, out SHOULD be set buf+1; that is, 'in' is incremented BEFORE the & operator is applied. No, Chris was right. The parentheses here have no effect at all. Parentheses only affect binding, and here the default binding is the same as what they ask for. It is analogous to this: x = (y++); Here, x will get the OLD value of y. And out will get buf, the old value of in. The value of a variable that has ++ after it does NOT change until after it has been used. In this case that means that the old value of in is "passed to" * and then to () and then to &. Mark Brader, NTT Systems Inc.