At program startup, the value stored is zero.
Library functions store only values greater than zero.
Any library function can alter the value stored, but only those cases where a library function is explicitly required to store a value are documented here. To test whether a library function stores a value in errno , the program should store the value zero there immediately before it calls the library function. An implementation can define additional macros in this standard header that you can test for equality with the value stored. All these additional macros have names that begin with E . The macro yields the value stored in errno on a domain error.