Posted on 15th October 2009No Responses
What is Pointer Variable
Pointer Variables
If a variable is going to hold a pointer, it must be declared as such. A pointer declaration consists of a base type, an *, and the variable name. The general form for declaring a pointer variable is
type *name;
Where type is the base type of the pointer and may be any valid type. The name of the pointer variable is specified by name.
The base type of the pointer defines what type of variables the pointer can point to. Technically, any type of pointer can point anywhere in memory. However, all pointer arithmetic is done relative to its base type, so it is important to declare the pointer correctly.
Popularity: 1% [?]
Comments
Leave a Response