[Solved] Which is better, ch = ‘\n’; write(1, &ch, 1); or putchar(‘\n’);?
The putchar is a library function. It calls the write system call to write the character in stdout. If we access the system call so many time, the system performance will get slow. So only, the library functions are implemented. The library functions for writing, it allocates a buffer, once if the buffer is fulled … Read more