(ANSI) C Reference – Pointers, Arrays and Structures

A look at how to use pointers, arrays and structures in the C language.

You could also take a look at the C Array tutorial.

You could also take a look at the C Structures tutorial.

You could also take a look at the C Pointers tutorials.


void * ->  Generic pointer type


NULL ->  Null pointer


type *name ->  Declare pointer to type


type *f() ->  Declare function returning pointer to type


type (*pf)() ->  Declare pointer to function returning type


*pointer ->  Object pointed to by pointer


&name ->  Address of object name


name[dim] ->  Array


name[dim1][dim2] ->  Multidimensional array


struct tag ->  structure template

{

declarations ->  declaration of members

};


struct tag name ->  Create structure


name.member ->  Member of structure


pointer -> member ->  Member of pointed to structure


union ->  Single value, multiple type structure


member : x ->  Bit-field with x bits


This entry was posted in Pointers Arrays and Structures. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Tweet This! Tweet This! or use to share this post with others.

Leave a Reply: