Are valid definitions for NULL in C. The crux of the matter, in fact, is that C disallows conversions from void., even when the value is a constant zero, but, for constant zero, introduces a special case anyway: int to pointer (actually several of them: short to pointer, long to pointer, etc.). Nov 13, 2017 This video is about null and nullptr in c and how we use them. Please subscribe the channel.
What Is A Nullptr
| Language | ||||
| Standard Library Headers | ||||
| Freestanding and hosted implementations | ||||
| Named requirements | ||||
| Language support library | ||||
| Concepts library(C++20) | ||||
| Diagnostics library | ||||
| Utilities library | ||||
| Strings library | ||||
| Containers library | ||||
| Iterators library | ||||
| Ranges library(C++20) | ||||
| Algorithms library | ||||
| Numerics library | ||||
| Input/output library | ||||
| Localizations library | ||||
| Regular expressions library(C++11) | ||||
| Atomic operations library(C++11) | ||||
| Thread support library(C++11) | ||||
| Filesystem library(C++17) | ||||
| Technical Specifications |
| Type support (basic types, RTTI, type traits) | |||||||||||||||
| Dynamic memory management | |||||||||||||||
| Error handling | |||||||||||||||
| Program utilities | |||||||||||||||
| Variadic functions | |||||||||||||||
| Library feature-test macros | |||||||||||||||
| Date and time | |||||||||||||||
| Function objects | |||||||||||||||
| Formatting library(C++20) | |||||||||||||||
(C++11) | |||||||||||||||
(C++20) | |||||||||||||||
(C++11) | |||||||||||||||
(C++14) | |||||||||||||||
| Relational operators (deprecated in C++20) | |||||||||||||||
| Comparisons (C++20) | |||||||||||||||
| Integer comparison functions | |||||||||||||||
(C++20) | |||||||||||||||
| Common vocabulary types | |||||||||||||||
| |||||||||||||||
| Swap, forward and move | |||||||||||||||
(C++14) | |||||||||||||||
(C++11) | |||||||||||||||
(C++11) | |||||||||||||||
(C++11) | |||||||||||||||
| Elementary string conversions | |||||||||||||||
(C++17) | |||||||||||||||
(C++17) | |||||||||||||||
(C++17) | |||||||||||||||
| Type operations | |||||||||||||||
(C++11) | |||||||||||||||
(C++17) | |||||||||||||||
(C++17) | |||||||||||||||
| Basic types | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Fundamental types | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Fixed width integer types(C++11) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Numeric limits | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C numeric limits interface | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Runtime type information | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Type traits | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Type categories | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++11) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++11) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++11) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++11) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++11) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++11) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Type properties | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Type trait constants | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++11)(C++17)(C++11)(C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Metafunctions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Constant evaluation context | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Supported operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Relationships and property queries | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Type modifications | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Type transformations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <cstddef> |
Defined in header <cstdlib> |
Defined in header <ctime> |
#define NULL /*implementation-defined*/ |

The macro NULL is an implementation-defined null pointer constant, which may be
an integral constant expressionrvalue of integer type that evaluates to zero | (until C++11) |
an integer literal with value zero, or a prvalue of type std::nullptr_t | (since C++11) |
A null pointer constant may be implicitly converted to any pointer type; such conversion results in the null pointer value of that type. If a null pointer constant has integer type, it may be converted to a prvalue of type std::nullptr_t.
[edit]Possible implementation
C++ 11 Nullptr
[edit]Notes
C++ Nullptr Vs Null
In C, the macro NULL may have the type void*, but that is not allowed in C++. Universal audio auto tune.
[edit]Example
Possible output:
[edit]Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| CWG 903 | C++11 | constant expressions with zero value such as 1-1 were allowed | only the literal zero is allowed |
C++ Include For Nullptr
[edit]See also
| nullptr | the pointer literal which specifies a null pointer value (C++11)[edit] |
(C++11) | the type of the null pointer literal nullptr (typedef)[edit] |