<story><title>C uses &quot;&amp;&quot; for the address-operator because &apos;ampersand sounds like &quot;address&quot;&apos;</title><url>https://softwareengineering.stackexchange.com/questions/252023/why-does-c-use-the-asterisk-for-pointers</url></story><parent_chain></parent_chain><comment><author>adrian_b</author><text>Some people in that discussion wonder about &amp;quot;-&amp;gt;&amp;quot;, which is used for indirect addressing through a structure member.&lt;p&gt;When C has added structures, which did not exist in B, it has taken the keyword &amp;quot;struct&amp;quot; and also both &amp;quot;.&amp;quot; and &amp;quot;-&amp;gt;&amp;quot; from the IBM PL&amp;#x2F;I language, from which C has also taken some other features.&lt;p&gt;In general, almost any feature added by C to B was taken either from PL&amp;#x2F;I or from Algol 68. The exceptions are &amp;quot;continue&amp;quot; and the generalized &amp;quot;for&amp;quot;, which did not exist in any previous language.&lt;p&gt;(However the generalized &amp;quot;for&amp;quot; of C was a mistake, because it complicates the frequent use cases in order to simplify seldom encountered use cases. The right way to generalize &amp;quot;for&amp;quot;, i.e. with iterators, was introduced by Alphard in the same year with C, i.e. in 1974.) (Compare &amp;quot;for (I=0;I&amp;lt;N;I+=5) {&amp;quot; of C with &amp;quot;for I from 0 to N by 5 do&amp;quot; or &amp;quot;for I in 0:N:5 do&amp;quot; of previous languages. C requires typing a lot of redundant characters in the most frequent cases.)&lt;p&gt;The oldest symbol for indirection through a pointer (in the language Euler, in January 1966) was a raised middle dot (i.e. a point). This was before ASCII and ASCII did not include the raised middle dot (U+00B7), so it was replaced by the most similar ASCII character, &amp;quot;*&amp;quot;.&lt;p&gt;Euler had used &amp;quot;@&amp;quot; for &amp;quot;address of&amp;quot; and indirection was a postfix operator, as it should. Making &amp;quot;*&amp;quot; a prefix operator in B and C was a mistake, which forced the importing of &amp;quot;-&amp;gt;&amp;quot; from PL&amp;#x2F;I, to avoid an excessive number of parentheses. Otherwise &amp;quot;(*x).y&amp;quot; would have been needed, instead of &amp;quot;x-&amp;gt;y&amp;quot;. With a postfix &amp;quot;*&amp;quot;, that would have been &amp;quot;x*.y&amp;quot;, and &amp;quot;-&amp;gt;&amp;quot;, would not have been needed.&lt;p&gt;In CPL, the ancestor of BCPL and B, indirection was implicit, like with the C++ references. Instead of having an &amp;quot;address of&amp;quot; operator, CPL had a distinct symbol for an assignment variant that assigns the address of a variable, instead of assigning its value.</text></comment>
<story><title>C uses &quot;&amp;&quot; for the address-operator because &apos;ampersand sounds like &quot;address&quot;&apos;</title><url>https://softwareengineering.stackexchange.com/questions/252023/why-does-c-use-the-asterisk-for-pointers</url></story><parent_chain></parent_chain><comment><author>latexr</author><text>The correct link is &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;softwareengineering.stackexchange.com&amp;#x2F;a&amp;#x2F;273268&amp;#x2F;94821&quot; rel=&quot;nofollow noreferrer&quot;&gt;https:&amp;#x2F;&amp;#x2F;softwareengineering.stackexchange.com&amp;#x2F;a&amp;#x2F;273268&amp;#x2F;94821&lt;/a&gt;, which points directly to the answer.</text></comment>