fork(2) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. char buf[10];
  6. sprintf(buf, "%.5s.%.5s", "100", "09");
  7. printf("'%s'\n", buf);
  8. float f = strtod(buf, NULL);
  9. printf("%f\n", f);
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 10320KB
stdin
Standard input is empty
stdout
'100.09'
100.089996