title: ansi c: converting argv into int
body: <p>hi i wanted to convert the argv in ansi-c into int. i am not sure of a few things...</p>
  
  <pre><code> int main(int argc, char* argv[])
  </code></pre>
  
  <p>let's assume my program is run as follows ./a input1 input2.</p>
  
  <p>let's assume in this case that my input1 = 12345 and input2=67890</p>
  
  <p>i don't want to use atoi. i wanted to convert it all by my own. for example when i call the argv[1] is it equal to only "12345" or is it possible that it may be "  12345 "? i.e. can it have spaces from any of its sides?</p>
  
  <p>the problem with atoi and sscanf is that if my input1="0" and input1="abc"</p>
  
  <p>then both atoi and sscanf would return 0, if i am wrong correct me... thanks!</p>