This is a small trick to compress the increment into a statement that returns zero. This is logically equivalent to conditional
if (ap > ac) { ap++; return 0; }
or even better with a comma :
return (ap++, (char *)0);
Note that since zero in your example is not a compile-time constant, the expression requires the cast to conform to the standard:
if (ap>ac) return (char*)(0*ap++);
As for returning an integer zero, it is considered equal to a NULL pointer when used in the context of a pointer.
source share