This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

difference between volatile and const

I would like to know the difference between volatile and const.Pls. explain it with an example.

Parents
  • Hi,

    CONST is used to declare the constants i.e the value of this data type will not be changed through out the program execution.

    VOLATILE, Normal this data type will be used to declare the variable for timercount & interrupt status because the value of this specific types can't be expected any time.

    Krishna M.

Reply
  • Hi,

    CONST is used to declare the constants i.e the value of this data type will not be changed through out the program execution.

    VOLATILE, Normal this data type will be used to declare the variable for timercount & interrupt status because the value of this specific types can't be expected any time.

    Krishna M.

Children