3 ms·
A terminating null element or logical equivalent in an array is helpful in lots of situations. As one example it simplifies the logic of looking for an element
by dsamarin 8y ago
A terminating null element or logical equivalent in an array is helpful in lots of situations. As one example it simplifies the logic of looking for an element in an array and performing some special operation if it was not found. No bool found variable necessary.
- jbverschoor 8y agoWell yes, but it can easily be removed by accident, and is easy to oversee. See the parent comment