### __reverse4 -- Reverse the Bytes in a 4 Byte Value

Format

>     #include <builtin.h>

>     unsigned int __reverse4(unsigned int num)

Language Level: None
__reverse4 reverses the byte order of num.

Return Value
Returns the byte reversed value.

Example
This example reverses the bytes of foo and prints out both the original and new values.

    #include <stdio.h>
    #include <builtin.h>

    unsigned int foo = 0x01020304;

    int main(void)
    {
       printf("foo = %.8x  foo byte reversed = %.8x\n",
              foo, __reverse4(foo));

       /************************************************
          The output should be:

          foo = 01020304  foo byte reversed = 04030201
       ************************************************/

       return 0;
    }

__reverse2 -- Reverse the Bytes in a 2 Byte Value
__reverse8 -- Reverse the Bytes in a 8 Byte Value