fork(7) download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. char postdata[] = "field1=";
  5. float mynumber = 123.12;
  6. char buffer[32];
  7. sprintf(buffer, "%s%.1f", postdata, mynumber);
  8. printf(buffer);
  9. return 0;
  10. }
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
field1=123.1