C programming ASCII basic : <p>I have char like          </p>

<pre><code> char testniPodatak[14] = "1234567890";
</code></pre>

<p>I want to test that every c in string is value from 0-9 according ascii table..</p>

<p>I do like this:</p>

<pre><code>for (int i = 0; i &lt; 9; i++)
{
     if (ISBN10[i] &lt; 48 || ISBN10[i] &gt;57)
     {
            return 3;
     }
}
</code></pre>

<p>If is out of range function need to return 3 , but in above string there is all chars 0-9, function return 3 on first iteration..</p>

<p>Here is table with ascii values <a href="https://allrounder163.files.wordpress.com/2014/09/ascii.png" rel="nofollow">https://allrounder163.files.wordpress.com/2014/09/ascii.png</a></p>

<p>Thanks</p>
