Here is your four character set:
const unsigned char buf[4] = { 'a', '0', '%', 'Q' };
Now we are collecting a 32-bit unsigned integer:
const uint32_t n = (buf[0]) | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
Here I assume that buf[0]is the least significant; if you want to go the other way around, just swap the indices around.
Confirm:
printf("n = 0x%08X\n", n);
: , , , (unsigned int)(unsigned char)(buf[i]); .
: const uint32_t n = *(uint32_t*)(buf), , , !
, , :
const unsigned very long int n = buf[0] |
(buf[1] << (CHAR_BIT) |
(buf[2] << (CHAR_BIT * 2) |
(buf[3] << (CHAR_BIT * 3) ;
! ( printf;-).)