The global variable errno is used by many standard C library functions to pass back to your program an error code that denotes specifically which error occurred. However, your program should not check the value of errno to determine whether an error occurred.
Usually, the standard C library function you are calling returns with a return code which denotes that an error has occurred and that the