3 ms·
Hence, use write()! Not completely joking here, I think everytime I've had to use strings to make two C programs communicate over a network, write() was as eas
by orwin 6y ago
Hence, use write()!
Not completely joking here, I think everytime I've had to use strings to make two C programs communicate over a network, write() was as easy to use as printf(). Obviously it's not true when communicating with a user.
- saagarjha 6y agowrite requires a length, it’s not specifically designed for working with strings like printf is.
- IncRnd 6y agoThat's not a bad point for many cases. I was pointing out that the coding rule in the upper comment to always use puts, and never printf, is bad advice. I am glad to hear you mention network coding. More people should do that, so fewer people make statements like, "always use puts for writing strings, never printf."