title: Check if char array contains digits
body: <p>So I have a random char array, i.e "asdd1vnb24vnf63vbn,-5h-2kk", and I should check if it contains digits, and if it does, my task is to add them with opposite signs (S=-1-2-4-6-3+5+2) <strong>without using string functions</strong>.
  But for now I'm stuck here and simply cannot understand why it doesn't work and "Sum" gives random numbers, though it is able to print digits in an array.</p>
  
  <pre><code>int main ()
  {
       char s [] = "asdd1vnb24vnf63vbn,-5h-2kk";
       int sum = 0;
       for (int i = 0; i &lt; sizeof(s)/sizeof(s[0]); i++) {
           if (isdigit(s[i]) !=0) {
                sum += s[i];
                cout &lt;&lt; "Sum is " &lt;&lt; sum &lt;&lt; endl;
           }
       }
       system ("pause");
       return 0;
  }
  </code></pre>
  
  <p>Can somebody tell me what's wrong?</p>