Array of Pointers in C

Last Updated Nov 20, 2015, 07:00:14 PM





An array of pointers work similar to an array of integers bu the only difference is the array of pointers holds the address location of all the array elements.

As we already know arrays are used to store collection of similar elements, array of pointers holds the address locations of an array

Syntax

In the above example, the array of pointers holds the address location of ten array elements

Try It Now

In the above example code, we declared three pointers which are pointing to strings and we have an array which contains the three pointers.

These three pointers are assigned to three different array locations such as 0,1,2



Other Pointer Topics you might want to learn

Pointers in C
Pointers to Functions in C