Can you do this with a union?



#include <stdio.h>

union it {
int x;
char bytes[4];
} X;