|Assume you have an array of 5 pointers, the last slot always has a NULL value and the first 4 always have valid pointers. You can then loop through the array until you find the NULL pointer.
With rare exceptions, this is a terrible programming technique. It is best to simply use the known bounds of the array or, better yet, use a collection class.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke