-7

Is there any difference between null and NULL ? I know null character ('\0') other than that any co-relation between them ?

1 Answers1

6

NULL is a macro that yields a null pointer constant (typically a plain, unadorned 0 or 0L in C++, and ((void *)0) in C). In modern C++, nullptr is usually the preferred way to get a null pointer constant though.

NUL is the ASCII designation for a zero-byte. The C standard calls this a "null character".

"null" is a normal word. In C++, its primary use is as part of the phrase "null pointer" (or "null pointer constant").

Jerry Coffin
  • 476,176
  • 80
  • 629
  • 1,111