There is no in-detail explanations of how everything work in standard C library I am aware of. I can not tell if there is any, but note that the implementation is platform-dependent. Thus, you will need many explanations.
It would be better for you to take a look at the documentation and the source of the libc you are using. For instance, for glibc
it can be found here: docs, source.
As of the headers you have mentioned, it really is not standard in C (except stdio.h
), though commonly used in linux. For instance, getopt.h
lets you use functions for command line options traversal. It is quite easy to google what each header is related to. There is no header-meaning relation in one place for every header you will see.
Finding out which header contains a function is usually done by googling. Yes, again. But there are at least two other ways to find it out. First, if you use an IDE, it can let you 'go to declaration' of a function, which will effectively find the header file. Second, you can grep
through all /usr/include/
files (or wherever your header files are stored) and find where the function is declared.
Also note that where a function is declared in a header does not tell you where the function is implemented. For instance, most (if not all) functions from standard library are implemented in glibc (or ms c runtime).