The thing to remember is that, in Linux, EVERYTHING is a file.
This means that, in the vast majority of cases, you can open() (or fopen()), read(), write(), close() just like a file.
Pretty elegant in most cases, actually. You do have to be careful about the buffering that fopen/fread/fwrite/fclose do. I've found that using the lower level open/read/write/close is better when you are talking directly to the kernel or to hardware (as you are indeed doing when you talk to /proc). It makes you do more housekeeping, but keeps you out of trouble.