Hi all
what is meant by volatile and const?
wher they can be used?
what is meant by volatile and const?
wher they can be used?
const volatile unsigned char io_register; // a byte sized I/O register
const int PI1000 = 3141; /* Constant integer */ const int *pcInt = &PI1000; /* pointer to an integer that is constant, the pointer can be changed but the value of the integer it points to can't */ const int const *pcInt = &PI1000; /* Constant pointer to an integer that is constant, the pointer can't be changed and neither can the value of the integer it points */ int x; int *pcInt = &x; /* Constant pointer to an integer, the pointer can't be changed but the value of the integer it points to can be changed */
const volatile unsigned char io_register; // a byte sized I/O register
Comment