I would like to create a C program that accepts an argument of the form
-aK
where K is some integer from 0-9.
How would I parse/specify this option?
You might want to check out getopt and/or getopt_long.