Hacker News new | ask | show | jobs
by wkz 2471 days ago
I feel like one alternative is missing from the list:

  fp = fmemopen(buf, sizeof(buf), "w");

  fputs("one", fp);
  fputs("two", fp);
  fputs("three", fp);

  fclose(fp);
Not sure how it performs, but it reads pretty well IMHO.