I want to convert 1byte of array element into 2 bytes E.g
arr[size] = {0x1F};
So, I want 0x1F will be stored in 2nd array like,
arr_2[size] = {0x01, 0x0f}
I have tried like following way...
for(i=j=0; j<2; i++){
arr_2[j] =(0xF0 & arr[i]) >> 4;
arr_2[j++]=(0x0F & arr[i]);
}
Thanks is advance..!!
You were almost there, but didn't use the proper for() syntax to increment multiple iterators.
Example: