title: In C how to write whichever end of line character is appropriate to the OS?
body: <p>Unix has \n, Mac was \r but is now \n and DOS/Win32 is \r\n. When creating a text file with C, how to ensure whichever end of line character(s) is appropriate to the OS gets used? </p>