I recently came across a lot of code snippets that use:
while (*pointer) {
... ++pointer;
}
I checked it with my lecturer whether it is good and "legal" to perform such an action, Because I thought the condition would not stop in case of pointer to integers array.
I could not get a clear answer, I would appreciate any answer if it is correct to use this case and why the condition works because it is not certain that at the end of the array will be 0 / NULL that will stop the condition.
Thanks in advance.