fork(1) download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. double x;
  6. unsigned char dbl[sizeof x]; /* real constant */
  7.  
  8. /* make x's format have a 1 bit on the "correct" place */
  9. x = 32.000000000000004;
  10. memcpy(dbl, &x, sizeof x);
  11. switch (dbl[0]) {
  12. case sizeof *dbl: puts("1"); break; /* real constant */
  13. case 0: puts("0"); break;
  14. default: puts("other");
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0s 5300KB
stdin
Standard input is empty
stdout
1