Search code examples
c++standardsstd

Is lowercase null valid in C++?


Is there any lowercase null in any version of C++ language specification?

Background:

I was asked in an interview "Which of the following pointer initializations are valid?", and I filled the form something like:

// valid
    int* p1 = 0;
    int* p2 = 2-2;
    int* p6 = new int;
// invalid
    int* p3 = 1; 

    int z = 0;
    int* p4 = z;
// ???
    int* p5 = null;

Solution

  • Is there any lowercase null in any version of the C++ language specification?

    No.