Back in the day, I found P.J. Plauger's "The Standard C Library" immensely instructive, as it contains a full implementation of the (then) standard library.
Admittedly, the book is more than 25 years old now, but I'm sure it would still make an interesting read:
https://www.amazon.com/Standard-C-Library-P-J-Plauger/dp/013...