Math, asked by classmate44, 1 year ago

what is asymbolic constant ? why should one use them?​

Answers

Answered by Anonymous
2

A symbolic constant is name that substitute for a sequence of character that cannot be changed. The character may represent a numeric constant, a character constant, or a string. When the program is compiled, each occurrence of a symbolic constant is replaced by its corresponding character sequence.

We should use it because :-

Use meaningful symbolic constants to represent literal values. ... When used in program logic, literals can reduce the readability of source code. As a result, literals, in general, and integer constants, in particular, are frequently called magic numbers because their purpose is often obscured.

Similar questions