fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int c=17163651;
  5. float f=c;
  6. int x=f;
  7. printf("c=%d f=%.5f x=%d\n", c, f, x);
  8.  
  9. c=17163650;
  10. f=c;
  11. x=f+1;
  12. printf("c=%d f=%f x=%d\n", c, f, x);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
c=17163651 f=17163652.00000 x=17163652
c=17163650 f=17163650.000000 x=17163652