playing with buffering modes in stdio.h

I was recently debugging a crashing program written in C using printf statements. I noticed that even if some printf statements executed before the crash, there was no output. I remembered something I read about stdio (the C standard I/O library) using buffering top of the read and write system calls to increase efficiency. I am writing this post as a reminder to my future self 😅 setvbuf and the…