答案是可以。
在windows
平台上,在 Microsoft Visual Studio 10.0\VC\include\stdio.h
文件中有定义:
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void*)0)
#endif
在linux
平台上,在 /usr/lib/gcc/x86-64-redhat-linux/4.8.2/include/stddef.h
文件中有定义:
#ifdef __GNUG__
#define NULL __null
#else
#ifndef __cplusplus
#define NULL ((void*)0)
#else
#define NULL 0
#endif
#endif