<<< Pointer dereference *ptr     Index     Pointer summary >>>

9. Pointer syntax


  1. Here, the asterisk * is a type modifier, not a dereference.

  2. Ampersand & operator returns an address of a variable: ptr = &x;

  3. Finally, an asterisk *ptr dereferences the pointer, providing access to the variable in memory:

    Dereference operator *ptr is also known as indirection operator.

     


<<< Pointer dereference *ptr     Index     Pointer summary >>>