If I have pointers of type T (T*) and I have an array of them T* array[N] will these two methods allow me to later check which entries are null pointers to lazily initialize stuff in each bucket?
memset(array, 0, sizeof(T*)*N);
or
for (int i = 0; i < N; ++i)
array[i] = NULL;
i.e. will the memset call also let me later do if (array[i] == NULL) ...?
I wouldn't want to introduce undefined behavior if not..
T* array[N] = {NULL};