Pages

July 22, 2010

The macro NULL is defined in several system header files, including stddef.h and stdio.h.
It is good style to set every pointer that is not currently holding a valid address to NULL.

Odd Test

The & operator provides a simple way to check if an integral value is odd: that is, whether its least significant bit is 1.

 odd  = value & 1

odd has the value 1 if value is odd, 0 if value is even.

No comments:

Post a Comment