/0x12345678

Convert Little Endian to Big Endian

Primary LanguageC

Convert Little Endian to Big Endian

U can try this C code

  int value;
  printf("size=%d\n",sizeof(value));

Output is "4"
Now U know that integers is 4 Bytes
And Range is 0x00000000 ~ 0xFFFFFFFF

How do we complete the conversion from 0x12345678 to 0x78563412?
The answer is in the main.c and main.char.c