C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
parse_w makes sure the value passed to it is an integer, and returns that integer if so. retv is the integer variable into which the string argument is parsed and which is returned to the caller.
With a big hat you would even be able to pull off a bunnywhich is in contrast to what a teacher ought to do; perhaps a pointer or a nudge in the right direction. I was curious if something similar had been covered in class. However I would go with something along the lines that tabstop suggested or look at the man page of getopt() to get an idea of how to go about this.
Hmm...there is a spectrum in that attitude. At one end, the prof could issue a handout and tell everyone that this is their completed assignment they are about to turn in, and explain in detail how they managed to do it. At the other, s/he could just demand an undescribed assignment, then wait until after the assignments had been handed in to explain what was suppose to be done, which I would agree that's not so helpful and could lead someone in just about any direction with very little clue about what the right one might be.
tabstop's suggestion about using switch is definately the thing here. From looking at the assignment, I would say the most complicated part is actually dealing with the options. Since you should be able to optimize beyond what getopts will give you, doing that instead might make a big difference to the whole.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
All I have to say is :
http://www.conestogac.on.ca/registra...dishonesty.jsp
Do your assignments yourself. First year is NOTHING compared to the stuff to come. If you're having THAT much trouble I would consider switching to another program because it doesn't get any easier.