Please explain following things in regard of C or C++:
-
The null pointer
-
The internal representation of a null pointer
-
The null pointer constant – 0
-
The NULL macro
-
The ASCII null character (NUL)
-
The null string (“”).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The null pointer is a pointer that doesn’t point to any object.
The internal representation is not specified, and specifically doesn’t have to be all bits zero.
The value 0 can be converted to a null pointer.
The NULL macro is defined as a value that can be converted to a null pointer, in C++ it is often just
0and in C often(void*)0, but can be other values as well if the implementation decides so.The NUL character is a character that has the value
0or'\0'.The string
""is just an empty string.