Null Character Definition & Meaning

A null character is one that carries no value and has all its bits set to 0. It is available in most major programming languages and many major character sets, including ASCII and Unicode. It is sometimes abbreviated as NUL or referred to as a null byte.

How are null characters used?

Null characters have several use cases. In early computer technology, blank rolls of punched paper tape were considered to consist entirely of null characters that would eventually be replaced once new characters were punched. In database, spreadsheet, and word processor applications, null characters are often displayed as spaces to create padding.

In the C programming language and its derivatives, a null character is represented by . This escape sequence marks the end of a character string. In C++, some examples might look like this:

This sentence will stop after “the” as noted by the null character placement:

cout << “I will not finish the sentence.”;

This sentence stops at its natural end because the null character falls after the period:

cout << “I will finish the sentence.”;


Avatar
Kaiti Norton
Kaiti Norton is a Nashville-based Content Writer for TechnologyAdvice, a full-service B2B media company. She is passionate about helping brands build genuine connections with their customers through relatable, research-based content. When she's not writing about technology, she's sharing her musings about fashion, cats, books, and skincare on her blog.

Top Articles

Huge List Of Texting and Online Chat Abbreviations

From A3 to ZZZ we list 1,559 text message and online chat abbreviations to help you translate and understand today's texting lingo. Includes Top...

How To Create A Desktop Shortcut To A Website

This Webopedia guide will show you how to create a desktop shortcut to a website using Firefox, Chrome or Internet Explorer (IE). Creating a desktop...

The History Of Windows Operating Systems

Microsoft Windows is a family of operating systems. We look at the history of Microsoft's Windows operating systems (Windows OS) from 1985 to present...

Hotmail [Outlook] Email Accounts

  By Vangie Beal Hotmail is one of the first public webmail services that can be accessed from any web browser. Prior to Hotmail and its...

Supply Chain Definition &...

A supply chain is a network between an organization and its suppliers to...

Relational Database Definition &...

A relational database stores and connects data in tables and columns, emphasizing the...

Common Business-Oriented Language (COBOL)...

What is COBOL? COBOL stands for Common Business-Oriented Language. It is a 60-year-old programming...