a value indicating that a pointer does not refer to a valid object

In computing, a null pointer (sometimes shortened to nullptr or null) or null reference is a value saved for indicating that the pointer or reference does not refer to a valid object. โ€ฆ Wikipedia
๐ŸŒ
Wikipedia
en.wikipedia.org โ€บ wiki โ€บ Null_pointer
Null pointer - Wikipedia
3 weeks ago - For example, in x86 real mode, the address 0000:0000 is readable and also usually writable, and dereferencing a pointer to that address is a perfectly valid but typically unwanted action that may lead to undefined but non-crashing behavior in the application; if a null pointer is represented as a pointer to that address, dereferencing it will lead to that behavior. There are occasions when dereferencing a pointer to address zero is intentional and well-defined; for example, BIOS code written in C for 16-bit real-mode x86 devices may write the interrupt descriptor table (IDT) at physical address 0 of the machine by dereferencing a pointer with the same value as a null pointer for writing.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ c language โ€บ null-pointer-in-c
NULL Pointer in C - GeeksforGeeks
As the value of NULL in predefined libraries is 0 and the pointer (that's pointing to NULL) is not pointing to any memory location, this behavior occurs. We can pass a NULL value for pointers that should not contain any value to the function in C.
Published ย  January 10, 2025
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ cprogramming โ€บ c_null_pointer.htm
NULL Pointer in C
A NULL pointer in C is a pointer that doesn't point to any of the memory locations. The NULL constant is defined in the header files stdio.h, stddef.h as well as stdlib.h.
๐ŸŒ
Unstop
unstop.com โ€บ home โ€บ blog โ€บ null pointer in c | a detailed explanation with examples
Null Pointer In C | A Detailed Explanation With Examples // Unstop
May 3, 2024 - A null pointer in C does not point to any memory location. They are used in dynamic memory allocation, error handling, initialization of other pointers and more.
๐ŸŒ
Scaler
scaler.com โ€บ topics โ€บ null-pointer-in-c
What is Null Pointer in C? - Scaler Topics
November 9, 2022 - A null pointer refers to the 0th memory location, which is a shared memory area that can't be dereferenced. In the example below, We create a pointer *ptr and assign it the value NULL to indicate that it doesn't point to any variables.
๐ŸŒ
EDUCBA
educba.com โ€บ home โ€บ software development โ€บ software development tutorials โ€บ c programming tutorial โ€บ null pointer in c
Null pointer in C | How Null pointer work in C with Examples
March 28, 2023 - In C programming language pointers are used to point to the memory that is allocated dynamically or at run time and a pointer can be of any data type like int, float, char, etc. In this article, we are discussing the null pointer in C, where NULL is constant with value 0 in C.
Call ย  +917738666252
Address ย  Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
๐ŸŒ
Javatpoint
javatpoint.com โ€บ null-pointer-in-c
Null Pointer in C - javatpoint
Null Pointer in C with programming examples for beginners and professionals covering concepts, control statements, c array, c pointers, c structures, c union, c strings and more.
Find elsewhere
๐ŸŒ
Dot Net Tutorials
dotnettutorials.net โ€บ home โ€บ null pointer in c
Null Pointer in C Language with Examples - Dot Net Tutorials
November 16, 2023 - Dereferencing: Dereferencing a null pointer leads to undefined behavior, often resulting in a runtime error or a program crash. The pointer variable, initialized with the null value, is called the Null Pointer. Null Pointer doesnโ€™t point to ...
๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ c-using-null-pointer-in-c-programming-123293
Using Null Pointer in C Programming
A null pointer is a pointer that does not point to any memory address. In C programming, a null pointer is represented by the constant NULL, which is defined in the header file stdio.h.
๐ŸŒ
WsCube Tech
wscubetech.com โ€บ resources โ€บ c-programming โ€บ null-pointer
Null Pointer in C Language (Uses, Best Practices, Examples)
August 29, 2025 - Learn about the null pointer in C language, including its syntax, uses, how to check it, best practices, examples, and more. Read now!
๐ŸŒ
CodeWithHarry
codewithharry.com โ€บ tutorial โ€บ c-null-pointer
NULL Pointer | C Tutorial | CodeWithHarry
In contrast, an uninitialized pointer means that the pointer occupies a garbage value address. The garbage value address is still a real memory location and hence not a NULL value. So to be on the safe side, NULL pointers are preferred. NULL pointers and void pointers very much sound similar just because of their nomenclatures, but they are very different as a NULL pointer is a pointer with a NULL value address, and a void pointer is a pointer of void data type.
๐ŸŒ
Sanfoundry
sanfoundry.com โ€บ c-tutorials-null-pointer
NULL Pointer in C Programming with Examples - Sanfoundry
April 17, 2025 - This C Tutorial Explains NULL Pointer in C with Examples. It is a type of pointer that doesnโ€™t point to any memory location, but the zeroth memory location.
๐ŸŒ
GNU
gnu.org โ€บ software โ€บ c-intro-and-ref โ€บ manual โ€บ html_node โ€บ Null-Pointers.html
Null Pointers (GNU C Language Manual)
A pointer value can be null, which means it does not point to any object. The cleanest way to get a null pointer is by writing NULL, a standard macro defined in stddef.h. You can also do it by casting 0 to the desired pointer type, as in (char *) 0.
๐ŸŒ
W3Schools
w3schools.com โ€บ c โ€บ c_null.php
C NULL
C Examples C Real-Life Examples C Exercises C Quiz C Compiler C Syllabus C Study Plan C Interview Q&A C Certificate ... NULL is a special value that represents a "null pointer" - a pointer that does not point to anything.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnprogramming โ€บ trying to understand null pointers
r/learnprogramming on Reddit: Trying to understand NULL pointers
December 30, 2021 -

Hello all again,

I have another stupid question here lol, so I'm trying to wrap my head around NULL. Im currently under the impression that NULL is a built in constant that has a value of zero, but what does that actually mean? When would it be appropriate to use null? If someone could explain it in layman's terms that would be super helpful!

๐ŸŒ
Eskimo
eskimo.com โ€บ ~scs โ€บ cclass โ€บ notes โ€บ sx10d.html
10.4 Null Pointers
A function that returns pointer values can return a null pointer when it is unable to perform its task. (A null pointer used in this way is analogous to the EOF value that functions like getchar return.) As an example, let us write our own version of the standard library function strstr, which looks for one string within another, returning a pointer to the string if it can, or a null pointer if it cannot.
๐ŸŒ
ScienceDirect
sciencedirect.com โ€บ topics โ€บ computer-science โ€บ null-pointer
Null Pointer - an overview | ScienceDirect Topics
We will now create a classic NULL pointer example, the most typical problem with programs. NULL pointers can lead to all kinds of unexpected behavior, including kernel crashes. Our program, called null-pointer.c, now looks like this: Copyright ยฉIntel Corporation.