answersLogoWhite

0

A constant.

This is often used to make programming languages more human readable and give a hint to the compiler what a number ought to be by encasing it in a type.

For example in C by using "const char LF = 0x0a;" not only does it make it easier for a human to see that a "Line-Feed" character is being meant when LF is used instead of 0x0a, the compiler should also throw up a warning if LF is not being used as a character. It also stops the user from trying to change LF (albeit accidentally) with, say "LF = 0x0d;" as the compiler will error; the same error protection can be achieved by using "#define LF 0x0a" but as this is a preprocessor textual substitution it loses the warning ability of misusing the LF not as a char.

User Avatar

Wiki User

7y ago

Still curious? Ask our experts.

Chat with our AI personalities

ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
JudyJudy
Simplicity is my specialty.
Chat with Judy
BeauBeau
You're doing better than you think!
Chat with Beau
More answers

It is a constant.

User Avatar

Wiki User

7y ago
User Avatar

Add your answer:

Earn +20 pts
Q: What variable that is set and cannot change is?
Write your answer...
Submit
Still have questions?
magnify glass
imp