fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3. #include <math.h>
  4.  
  5. int main(void) {
  6. double NumVar;
  7. printf("sizeof(Double) = %ld\n", sizeof(double));
  8. NumVar = 2.0;
  9.  
  10. NumVar = round(NumVar) / 10.0;
  11. printf("%llu\n", *((uint64_t *)(&NumVar)));
  12.  
  13. NumVar = round((double)2.0) / 10.0;
  14. printf("%llu\n", *((uint64_t *)(&NumVar)));
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 4484KB
stdin
Standard input is empty
stdout
sizeof(Double) = 8
4596373779694328218
4596373779694328218