Hacker News new | ask | show | jobs
by HelloNurse 28 days ago
There is an easy way to take control: read the volatile variable only once.

  volatile int x = 5;
  ...
  int y=x;
  printf("%d in hex is 0x%x.\n", y, y);