[Main]
Title=Dereferencing operator ('*')
Index=*

[Top]
In the expression
<PRE>* <I>expr</I>
</PRE>
which means "the object pointed to by <I>expr</I>",
the <I>expr</I> must have type "pointer to <I>type</I>," where <I>type</I> is any
data type. The result of the indirection is of type <I>type</I>.
<BR><BR>
If the operand is of type "pointer to function", the result is a function
designator. If the operand is a pointer to an object, the result is an <A HREF="$$LINK(lvalue)">lvalue</A>
designating that object.
<BR><BR>
In the following situations, the result of indirection is undefined:
<OL>
<LI>
The <I>expr</I> is a null pointer.
</LI>
<LI>
The <I>expr</I> is the address of an
automatic (local) variable and execution of its
block has terminated.
</LI>
</OL>
You can also use the asterisk as an operator to dereference a pointer, or as
the <A HREF="$$LINK(mult)">multiplication operator</A>. Asterisk may be used also as a
punctuator for creating <A HREF="$$LINK(asterisk)">pointer types</A>.
