Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!uwm.edu!rutgers!ub!oswego!news From: hunter@Oswego.EDU (Eric Hunter) Newsgroups: comp.lang.c Subject: Re: p[1] vs. *(p+1) Summary: It's not addition. Message-ID: <1990Sep3.173250.8113@oswego.Oswego.EDU> Date: 3 Sep 90 17:32:50 GMT References: <1990Aug31.190103.15043@laguna.ccsf.caltech.edu> <0901@sheol.UUCP> <8382@ncar.ucar.edu> Reply-To: hunter@oswego.Oswego.EDU (Eric Hunter) Organization: Instructional Computing Center, SUNY at Oswego, Oswego, NY Lines: 15 In <0901@sheol.UUCP> throopw@sheol.UUCP (Wayne Throop) writes: >Or to try putting it another way, I think it is misleading to say that >"adding one to p 'really' adds sizeof(*p) to p". I disagree. I say it >"really" adds 1, and the result points at an element in the array into >which p points which is offset exactly 1 array element from where p points. It doesn't "really" add 1; it increments the pointer variable to the next available address. Eric. ------------------------------------------------------------------------------- | Eric Hunter | The difference between emacs, and vi, is like the| | hunter@oswego.oswego.edu | difference between making love, and masturbation.| -------------------------------------------------------------------------------