#include <stdio.h> int main() { int n = 0x22445566; int b = ((n & 0x000000ff) << 24)|((n & 0x0000ff00) << 8) | ((n & 0x00ff0000) >> 8) | ((n &0xff000000) >> 24); printf("n = %X\nb = %X\n", n, b); }