Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site brl-vgr.ARPA Path: utzoo!watmath!clyde!floyd!harpo!seismo!brl-vgr!gwyn From: gwyn@brl-vgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: pointer question Message-ID: <3300@brl-vgr.ARPA> Date: Thu, 5-Apr-84 17:18:29 EST Article-I.D.: brl-vgr.3300 Posted: Thu Apr 5 17:18:29 1984 Date-Received: Sat, 7-Apr-84 03:17:41 EST References: <7624@mgweed.UUCP>, <937@inuxc.UUCP> Organization: Ballistics Research Lab Lines: 17 What you say is true but your example (p = p + 4) may be confusing. If p is declared as a pointer to a 4-byte something, then ++p; and p = p + 1; are equivalent. p = p + 4; on the other hand makes the pointer point to the 4th something after what it used to point to. I think you meant using things like int p's: int p; p = p + 4; do something with *(something *)p; which is a (not recommended!) way to use an int as a pointer to something. If p is properly declared, then you would have had to write your example in a way that makes the shenanigans obvious: something *p; /* 4 bytes per something */ p = (something *)((int)p + 4);