What is pointer ? Give an Example

Pointer is derived data type in c.Pointer stores memory address of variable or functions return value. Pointers are used to handle Dynamic Memory Allocation too. Pointers can be declared by adding prefix before variable.

int *ptr. // Integer pointer points to the integer location

Example:

 

 

%d bloggers like this: