Aquinas is an interactive learning system that aims to teach computer programming and exploit development.
There exist many guides to teach network programming. Stevens' TCP/IP Illustrated volumes remain a solid resource. Beej’s Guide to Network Programming is a popular among up-and-coming C programmers. Go provides a net package that is suitable for network programming. Python also provides a networking package, along with documentation.
The CERT C Coding Standard enumerates a number of rules that aim to avoid the many pitfalls of the C programming language.