title: How to convert a string say of type AA:BB:CC:DD:EE:FF to 0xaabbccddeeff in C?
body: <p>Input: AA:BB:CC:DD:EE:FF Output expected: 0xaabbccddeeff.
  Input: AA:BB:65:F0:E4:D4 Output expected:0xaabb65f0e4d4</p>
  
  <pre><code>      char arr[20]="AA:BB:CC:DD:EE:FF";
        char t[20]="0x";   
        char *token=strtok(arr[i], ":");
        while(token !=NULL){
        printf("%s\n", token);
        token = strtok(NULL, ":");
        strcat(t, token);
          }
  printf("The modified string is %s\n", t);
  </code></pre>
  
  <p>I am seeing a segmentation fault.</p>