fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. {
  6. const float m=124;
  7. float* d=(float*)&m;
  8. printf("%.6f %.6f\n",m,*d);
  9. *d=235.4;
  10. printf("%.6f %.6f\n",m,*d);
  11. }
  12. printf("volatile\n");
  13. {
  14. volatile const float m=124;
  15. float* d=(float*)&m;
  16. printf("%.6f %.6f\n",m,*d);
  17. *d=235.4;
  18. printf("%.6f %.6f\n",m,*d);
  19. }
  20. }
  21.  
Success #stdin #stdout 0s 4408KB
stdin
Standard input is empty
stdout
124.000000 124.000000
124.000000 235.399994
volatile
124.000000 124.000000
235.399994 235.399994