I would like to know the simplest and most effective way to open and write data to a socket in the C programming language for network programming.
You don't mention what platform you are on, but a copy of Unix Network Programming by Stevens would be a good addition to your bookshelf. Most operating systems implement Berkley Sockets using socket, bind, connect, etc.