So we are now going to explain what concept is const allows you to set a variable is read only.
It should be noted that this is a compile time only thing.
Essentially at runtime you can still change the memory.
It isn't protected at the processor level in any way.
If I now do const integer A equals 50 and I compile that.
You can see that works fine fine now do a 20.
Beneath here and compile lab error assignment of reader only variable a So we actually can assign it.
Now if I was to go chop off 20 and then I did char PCR equals path that would work fine.
Five ended point to zero equals 50.
That would work fine too.
We can pull out.
There's no problem.
If I now change this to cons char pointer and I cast this to const char pointer
and now I can pilot error assignment of read only location so we can no longer assign that but if I
did here above zero equals a path one equals B and I get rid of this and I did print f I I mean C to
C point to zero.
This would work fine.
So you can see if we run that we see a.
So the reason we can do this is because buff is not const however the point is above is cost.
So we can read it through the pointer but we can't assign it that it's not allowed.
So that's what concept is is a way of making variables read only.