You can use c[i]= '\0' or simply c[i] = (char) 0.

The null/empty char is simply a value of zero, but can also be represented as a character with an escaped zero.

Answer from ardent on Stack Overflow
Discussions

How to set character as Empty in C#
There's no numeric representation for this, as a number cannot represent "null", or "nothing". A Char will always hold some kind of value, and because each value has a unique useage, there is no character substitute for the empty string. Hope that helps, Nate ... InternalStatic: I have written "'\0' indicates Null." about char literals ... More on experts-exchange.com
🌐 experts-exchange.com
December 9, 2009
Empty character constant in C++ - Stack Overflow
I copied this code from a tutorial to play around with. However, I kept on getting an error that stated that I can't have any empty character constants. The tutorial was in Visual Studio 2008, and ... More on stackoverflow.com
🌐 stackoverflow.com
Empty Character Literal - Post.Byes - Bytes
The property accepts single char ... a empty literal. I am able to do this at design time using VS.NET property box. This works for controls created at design time, but for some controls I create at run-time I want to do the same at Form_load.. VJ ... Re: Empty Character Literal There ... More on post.bytes.com
🌐 post.bytes.com
November 17, 2005
c++ - Why can't character constants/literals be empty? - Stack Overflow
In C and C++ the rules are the same. In C, [§6.4.4.4]/2 An integer character constant is a sequence of one or more multibyte characters enclosed in single-quotes, as in 'x'. In C++, [§2.14... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Quora
quora.com › How-do-you-initialize-char*-to-an-empty-string-in-C
How to initialize char* to an empty string in C - Quora
1) Mutable buffer (recommended ... *s is undefined behavior ... The empty C string is represented by a single NUL character ('\0') at index 0....
🌐
Experts Exchange
experts-exchange.com › questions › 24963920 › How-to-set-character-as-Empty-in-C.html
Solved: How to set character as Empty in C# | Experts Exchange
December 9, 2009 - There's no numeric representation for this, as a number cannot represent "null", or "nothing". A Char will always hold some kind of value, and because each value has a unique useage, there is no character substitute for the empty string. Hope that helps, Nate ... InternalStatic: I have written "'\0' indicates Null." about char literals not string.
🌐
LinuxQuestions.org
linuxquestions.org › questions › programming-9 › how-to-return-empty-char-*-750700
How to return empty char * ?
August 27, 2009 - Hi: Here is my code: Code: char * func1(){ ... ... return ""; } This code give me warning "deprecated convertion from string to char *
🌐
Post.Byes
post.bytes.com › home › forum › topic › c sharp
Empty Character Literal - Post.Byes - Bytes
November 17, 2005 - I am able to do this at design time using VS.NET property > box. This works for controls created at design time, but for some controls I > create at run-time I want to do the same at Form_load..[/color] There's no such thing as an "empty" character, any more than there's an "empty integer".
Find elsewhere
🌐
Wikipedia
en.wikipedia.org › wiki › Null_character
Null character - Wikipedia
March 3, 2026 - The null character is a control character with the value zero. Many character sets include a code point for a null character – including Unicode (Universal Coded Character Set), ASCII (ISO/IEC 646), Baudot, ITA2 codes, the C0 control code, ...
🌐
Unity
discussions.unity.com › unity engine
Empty character literal Issue - Unity Engine - Unity Discussions
January 22, 2022 - I’ve re-watched the video multiple times and I made sure 100% I coppied everything correctly The error is : Assets\Scripts\PlayControl.cs(29,12): error CS1011: Empty character literal I typed the " but I think it’s missing something inside. Could anyone please help I know I should be looking ...
🌐
Northern Illinois University
faculty.cs.niu.edu › ~winans › CS501 › Notes › cstrings.html
C Strings
A C string (also known as a ... of a terminating "null character" (a character with ASCII value 0, usually represented by the character literal '\0')....
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › csharp › misc › cs1011
Resolve errors and warnings for string literal declarations - C# reference | Microsoft Learn
September 15, 2021 - Character literals represent a single character value and must contain exactly one character or a valid escape sequence, so empty character literals or those containing multiple characters violate the language rules for the char type.
🌐
Quora
quora.com › How-do-I-check-if-a-char-array-is-empty
How to check if a char array is empty - Quora
However, if you know that the array is really a C-style char string, which is a null-terminated byte sequence (NTBS), then maybe the condition you’re looking for is simply array[0] == ‘\0’? That tests whether the given array represents an empty string (i.e., the first character already terminates the string).
🌐
Weber State University
icarus.cs.weber.edu › ~dab › cs1410 › textbook › 8.Strings › c_string.html
8.2. C-Strings
String constants or string literals, like "hello world", are also C-strings. When the compiler processes a string literal, it adds the null termination character at the end of the quoted characters, stores them in memory, and generates code based on the string's address.
🌐
Wikipedia
en.wikipedia.org › wiki › Empty_string
Empty string - Wikipedia
January 16, 2026 - εR = ε. Reversal of the empty string produces the empty string, so the empty string is a palindrome. ... {\displaystyle \forall c\in s:P(c)} . Statements that are about all characters in a string are vacuously true.
🌐
IBM
ibm.com › support › pages › apar › PK61618
PK61618: WARNING ABOUT EMPTY CHAR LITERAL IN SQL STATEMENT
---------------------------------------------------------------- The empty character literal is in an SQL-Statement and it's ok there to use a empty character literal (in SQL, a ' is used to define Strings), so the compiler shouldn't produce this warning, when '' is used in a SQL-Statement ...
🌐
Blogger
javahungry.blogspot.com › 2021 › 11 › empty-character-literal.html
[Solved] Error: empty character literal | Java Hungry
The cause of this compilation error is due to trying to compare empty single quotes character with the char data type variable ch. As a result, we were getting error: empty character literal.