Errno and Error Management in C


Underlying any software development is program error detection and analysis. But then an external library function or system call fails, how can we understand what went wrong? These functions usually return -1 or NULL, but they also store the reason behind their failure in errno. Let’s see what errno actually is, and how to retrieve, interpret and print it out. What is Errno? Errno...