Sometimes, it is inconvenient to either state or compute the size of an array of some type of objects. That being the case, we must use a termination marker; usually a NULL or 0. For example, suppose we have a fixed array of strings, which we terminate with 0:
char *epics[] = {"AZN", "BOGUS", "ULVR", "VOD", 0} ;
The question is: how do we loop over that array? It can be quite difficult to work out the pointer arithmetic. The answer looks like this:
char **epic = epics; while(*epic) { puts(*epic); epic++; } puts("Finished");
In this example, all we are doing is printing the string to stdout. You are likely to want to do something more complicated. This will produce the output:
AZN BOGUS ULVR VOD Finished
I hope that helps.