Const keyword indicates that memory once initialized cannot be altered by the program. Volatile keyword indicates that the value at a particular memory location can be altered event though in the program modifies its content. Volatile is to improve the compiler optimization.