Cant Split and Store hexstring in array
<p>i wanted to split this hexstring, convert em, and store em in an array.
but it seems there is something off from my work, and i don't know what.</p>

<p>I intend to split this string</p>

<blockquote>
  <p>27CA6B</p>
</blockquote>

<p>to</p>

<pre><code> 27
 CA
 6B
</code></pre>

<p>but the output is always only the first string.
like</p>

<pre><code>27
51819
0
</code></pre>

<p>please somebody help, here is my code</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdint.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include &lt;errno.h&gt;

int main(void)
 {
char bc[] = "27CA6B";
char *theEnd;

long result;
long resulta;
long resultb;
long resultc;

result = strtol (bc, &amp;theEnd, 0);
resulta = strtol (theEnd, &amp;theEnd, 16 );
resultb = strtol (theEnd, NULL, 0);

//int i = 0;
//printf("%c%c%c%c%c%c\n", bc[0], bc[1], bc[2], bc[3], bc[4], bc[5]);

printf("%ld\n", result, &amp;bc[0]);
printf("%ld\n", resulta, &amp;bc[1]);
printf("%ld\n", resultb, &amp;bc[2]);


return 0;
 }
</code></pre>