♦ C Constants
♣ About C ConstantsConstants also hold value of Data Type alike variable but with some additional property.
Constants once defined and initialized can not be changed or manipulated in the remaining part of the code.
Constants come in very handy many times to define some constant valued entity which never changes and can be used multiple times, for example, PI whose approx value is 3.14.
♣ Example1: Constants in CConstant can be defined for all the data types.
These constant will then behave as read-only mechanism.
In this example, various constants are illustrated.
♣ Example2: Violating-Constants in CIn this example, Errors are illustrated when constants are attempted to change/manipulated.