title: Parsing command line arguments in c without spaces
body: <p>I have a program that parses command line arguments using a while loop. Simply, while iterating through the length of argc, if an argument matches a flag than the next argument is taken as a variable. Now in my assignment we are asked to do this in a way that spaces between flags and integer arguments are optional.</p>
  
  <p>For example if i input -k1 it is the same as -k 1 and 1 is the value stored.
  I can't find anything that allows this. The only thing I can think is that if argc is an even number it means that there are no pals between a set of argument and i could use scanf("-k%d",key). </p>
  
  <p>Any helpful pointers for me?</p>