// Demonstrate that a single fprintf(3) call can result in multiple // write(2) calls when you exceed BUFSIZ. In this case, it results in // three of them on my system. #include #include char large[16385]; int main() { printf("BUFSIZ is %d\n", BUFSIZ); memset(large, 'A', sizeof(large)); large[sizeof(large) - 1] = '\0'; fprintf(stderr, "%s\n", large); return 0; }