This was intended as a meme but is actually a good representation of what "Null" is. In C#, when you declare string s = "My shit"; it means that "s" is a reference to a memory location that holds the data "My shit". string s = null; means that the reference "s" exists but it's not pointing to any object, as in it holds nothing. Answer from abd53 on reddit.com
This was intended as a meme but is actually a good representation of what "Null" is. In C#, when you declare string s = "My shit"; it means that "s" is a reference to a memory location that holds the data "My shit". string s = null; means that the reference "s" exists but it's not pointing to any object, as in it holds nothing. Answer from abd53 on reddit.com
🌐
Wikipedia
en.wikipedia.org › wiki › Null_function
Null function - Wikipedia
June 6, 2025 - In computer science, a null function (or null operator) is a subroutine that leaves the program state unchanged. When it is part of the instruction set of a processor, it is called a NOP or NOOP (No OPeration). ... {\displaystyle s} unchanged. That is, a null function is an identity function ...
Discussions

language agnostic - What is the purpose of null? - Stack Overflow
Just like a negative length, distance or age is an edge case. You need to make sure that can't happen (by disallowing it in a constructor for example) or program defensively against it. 2020-12-09T20:36:06.997Z+00:00 ... Null is not a mistake. Null means "I don't know yet" More on stackoverflow.com
🌐 stackoverflow.com
tsql - How can I explain the difference between NULL and zero? - Software Engineering Stack Exchange
What null means depends on how the the data is interpreted: Null data may mean "not yet provided", and a program will wait a while before checking the value again. More on softwareengineering.stackexchange.com
🌐 softwareengineering.stackexchange.com
February 13, 2012
Understanding 'null'
I’m new to OOP. Having just read the excellent ‘a-quick-and-thorough-guide-to-null-what-it-is-and-how-you-should-use-it’ by Christian Neumanns, I’m still confused as the article doesn’t explain the reason for allowing a variable to have a null value at all. More on forum.freecodecamp.org
🌐 forum.freecodecamp.org
1
September 6, 2022
What is Null?
This was intended as a meme but is actually a good representation of what "Null" is. In C#, when you declare string s = "My shit"; it means that "s" is a reference to a memory location that holds the data "My shit". string s = null; means that the reference "s" exists but it's not pointing to any object, as in it holds nothing. More on reddit.com
🌐 r/learnprogramming
60
34
July 5, 2024
🌐
freeCodeCamp
freecodecamp.org › news › a-quick-and-thorough-guide-to-null-what-it-is-and-how-you-should-use-it-d170cea62840
A quick and thorough guide to ‘null’: what it is, and how you should use it
June 12, 2018 - If a person's dateOfFirstMarriage field points to null then it simply means that this person has never been married. Note: Unfortunately most popular programming languages don’t distinguish between nullable and non-nullable types. There is no way to reliably state that null can never be assigned to a given object reference. In some languages it is possible to use annotations, such as the non-standard annotations @Nullable and @NonNullable in Java.
Top answer
1 of 16
49

Null: The Billion Dollar Mistake. Tony Hoare:

I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years. In recent years, a number of program analysers like PREfix and PREfast in Microsoft have been used to check references, and give warnings if there is a risk they may be non-null. More recent programming languages like Spec# have introduced declarations for non-null references. This is the solution, which I rejected in 1965.

2 of 16
32

null is a sentinel value that is not an integer, not a string, not a boolean - not anything really, except something to hold and be a "not there" value. Don't treat it as or expect it to be a 0, or an empty string or an empty list. Those are all valid values and can be geniunely valid values in many circumstances - the idea of a null instead means there is no value there.

Perhaps it's a little bit like a function throwing an exception instead of returning a value. Except instead of manufacturing and returning an ordinary value with a special meaning, it returns a special value that already has a special meaning. If a language expects you to work with null, then you can't really ignore it.

🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Glossary › Null
Null - Glossary | MDN
In computer science, a null value represents a reference that points, generally intentionally, to a nonexistent or invalid object or address. The meaning of a null reference varies among language implementations.
🌐
Medium
robertdelwood.medium.com › thinking-like-a-programmer-understanding-null-959a5da1d625
Thinking Like a Programmer: Understanding Null | by Robert Delwood | Medium
September 21, 2025 - A null or nothing means there is no value for developers to read or use. If unchecked, that value results in an error. That’s why the null check needs to be there. ... Programmer/writer/programmer-writer.
Find elsewhere
Top answer
1 of 16
104

To explain to a boss the difference between "zero" and "null":

"Zero" is a value. It is the unique, known quantity of zero, which is meaningful in arithmetic and other math.

"Null" is a non-value. It is a "placeholder" for a data value that is not known or not specified. It is only meaningful in this context; mathematical operations cannot be performed on null (the result of any such operation is undefined, and therefore also generally represented as null).

For example, as in the comments: "What is your yearly income?" is a question requiring a numeric answer. "0" is a perfectly valid answer for someone who does not work and has no investment income. If the user does not enter a value at all, they don't necessarily make no money; they just didn't want to tell your software how much (or little) they make. It's an unknown, not specified; therefore, to allow the software to continue, you specify the "null" placeholder for that data field within the software. That's technically valid from a data perspective; whether it's valid at the business level depends on whether an actual numeric value (even zero) is required in order to perform a mathematical operation (such as calculation of taxes, or comparison with thresholds determining benefits).

In computers, virtually any operation on a variable containing null will result either in null or in an error condition, because since one of the variable's values is not known, the result of the expression cannot be known. The equivalent of performing math on null would be if I asked you "What's five plus the number I'm thinking of right now?". It's impossible for you to give a definite answer because you don't know the number I'm thinking of. An operation on zero, except for dividing by it, is usually valid and will return another known, unique value.

2 of 16
174

Boss-speak is always tough...

Zero is a number so you can do things with it.

Null is a unicorn. It doesn't exist so you can't do anything at all with it.

🌐
freeCodeCamp
forum.freecodecamp.org › t › understanding-null › 551338
Understanding 'null' - The freeCodeCamp Forum
September 6, 2022 - I’m new to OOP. Having just read the excellent ‘a-quick-and-thorough-guide-to-null-what-it-is-and-how-you-should-use-it’ by Christian Neumanns, I’m still confused as the article doesn’t explain the reason for allowing a variable to have a null value at all.
🌐
Quora
quora.com › What-does-NULL-mean-in-programming-languages
What does NULL mean in programming languages? - Quora
Answer (1 of 6): null is the pointer or reference to address zero. Why would this be needed or used? Let’s say you are searching for a library book that you want to read. Unlike Amazon, your library doesn’t have every book.
🌐
ThoughtCo
thoughtco.com › definition-of-null-958118
What Does Null Mean in C, C++ and C#?
April 27, 2019 - Null is a constant built into C, C++, and C#. It has a value of zero. Null can also be the value of a pointer that points nowhere.
🌐
Khoury College of Computer Sciences
khoury.northeastern.edu › home › kenb › MeaningOfNull.html
The Meaning of Null in Databases and Programming Languages
The main distinction between the relational null and the programming language null is the following: The relational null represents the absence of a value in a field of a record; whereas the programming language null represents one of the possible values of a variable.
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › csharp › language-reference › keywords › null
null keyword - C# reference | Microsoft Learn
January 26, 2026 - Access to this page requires authorization. You can try changing directories. ... The null keyword is a literal that represents a null reference, one that doesn't refer to any object.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Operators › null
null - JavaScript | MDN
The null keyword refers to the null primitive value, which represents the intentional absence of any object value.
🌐
Lucid
lucid.co › techblog › 2015 › 08 › 31 › the-worst-mistake-of-computer-science
Lucid
August 31, 2015 - It slips through them silently, waiting for runtime, to finally burst free in a shower of errors. NULL is the nothing that is simultaneously everything. There are many times when it doesn’t make sense to have a null. Unfortunately, if the language permits anything to be null, well, anything ...
🌐
TechTerms
techterms.com › definition › null
Null Definition - What does null mean to a computer?
September 26, 2022 - It does not mean a value of 0, since 0 is itself a value, nor does it mean a blank space " ". It also does not refer to an undefined variable, which has not been created at all. In the context of programming languages, a variable that has no value assigned is considered null.
🌐
Medium
medium.com › @shlomohassid › null-how-do-you-define-nothing-and-why-would-you-07683bdbe63a
NULL: How Do You Define Nothing? And Why Would You? | by Momi | Medium
May 31, 2025 - No true NULL at hardware level: ... of a null pointer. The CPU simply sees the address 0x0 like any other number. What makes 0 special is how software (and the operating system) treats it. In most operating systems, address 0 resides in a protected region of memory. The OS deliberately does not map any valid memory to address 0 (or often, to the entire first page of memory). This means if a program tries to read ...
🌐
TechCareer
techcareer.net › en › dictionary › null
What is Null? What does it do?
Null, in many programming languages, means "empty" or "nothing." It is used to indicate that a variable has no value. Null shows that an object or reference does not contain any data or does not point to an object.
🌐
W3Schools
w3schools.com › c › c_null.php
C NULL
C Examples C Real-Life Examples C Exercises C Quiz C Code Challenges 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.