Constants in C language
Constant value is understandable as nonchangeable value like PI=3.141592… value in math. Usually, you use constants in your programs, but don’t realize that they are constants. For instance: x=x+3; The number 3 is a constant which will be compiled directly in addition operation. Constants can be character or string. Like in function printf(“Hello World\n”); “Hello World” is a string constant that is placed in program memory and will never change. It is usually recommended to declare constants by using identifier with reserved word const: const int No=44; Identifying the variable as constant will cause the compiler to store this variable in program memory rather than in RAM, thus saving space in RAM. If special functions are used, then constants can also be stored in EEPROM memory.