4 ms·
There is a terminating NULL at the end of the array to stop the iteration.
by ahoka 8y ago
There is a terminating NULL at the end of the array to stop the iteration.
- jbverschoor 8y agooh my... that never went wrong
- dsamarin 8y agoA 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