
Newbie Array Problem - how to strncpy fr
Quote:
> >> I thought NULL was just a constant zero, not implicitly or
> >> explicitly a pointer value.
NULL (not necessarily the macro by the same name) is a pointer. Any use
of a constant 'zero' in a pointer context must generate a NULL pointer.
Because of this, some implementations define NULL as '0', when they
should more properly use '(void *)0'. The latter definition aids the
compiler in generating appropriate warning messages. Still, while a
zero generates a NULL, it is not advisable to assume that NULL will
generate a zero.
Quote:
>They will
*May*, not will. (Although they usually will).
Quote:
>There were a couple of compilers at one time that had NULL
>equal to -1 (I think ... but then again ...)
NULL is always represented as (some kind of) constant 0. The actual bit
pattern for a NULL need not be all zeroes, and both all ones and some
other patterns are used on various machines.
--
#include <standard.disclaimer>
_
Kevin D Quitt USA 91351-4454 96.37% of all statistics are made up