c – How does one represent the empty char?

c – How does one represent the empty char?

You can use c[i]= 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.

You cant store no character in a character – it doesnt make sense.

As an alternative you could store a character that has a special meaning to you – e.g. null char – and treat this specially.

c – How does one represent the empty char?

The empty space char would be . If youre looking for null that would be .

Leave a Reply

Your email address will not be published.