Maybe you are getting a little too focused on C specifics and not on the task itself?
Generally a good programming method is to design it as a flowchart showing what the program needs to do, then writing that out as comments saying exactly what it is doing and WHY, then at the end you can stick in the code part quite easily, regardless of the language. In fact if you write code in this fashion it can be converted to other languages very easily.
Maybe you should start a thread on what your program needs to do with the operation or flowchart described, and if you like some more detailed operation described as comments, and people can help you with the specific code segments you might be having difficulties with?