Let's discuss.
No Terminators.
Copy what I'm doing.
So we create a char pointer with a variable named ABC and we set it to Hello world.
Now in C whenever you provide a string like this a null terminator is automatically appended to the
end.
Now what a null terminator is it's simply a decimal zero.
That is all it is and I'm not talking about this a number zero.
I'm talking about an actual decimal zero is binary equivalent is eight zeros.
And basically all that does is it represents the end of a string.
And c c applies these by default when using strings like this.
That is very important to note.
So computers have character sets and this is a nice little chart to explain them so you can see over
here.
Capital a is decimal sixty five.
And it actually works like that.
If you create a char variable and you assign it to sixty five and then you print it out with the C with
a percent C for char you will see a.
That is how it works.
But the.
But the decimal equivalent is sixty five.
Now over here I know he's decimal 0.
You understand.
Whereas the number zero is decimal 48.
So that explains that.
And basically this character chart is very important because it allows it allows it.
So when you type helo on the keyboard the binary is converted into characters one is display to you
on the screen is converted to pixels.
The represent characters based off this chart.
So that is why decimal 0 is different from number zero.
So decimal zero which is on null terminator is decimal zero and number zero which is not on null terminator
is decimal forty eight.
No Terminator is actually invisible on most text editors.
They are usually rendered as a whitespace almost they look like a space.
Almost as if you press the spacebar.