I remember from somewhere that char is always one byte. Then short <= int <= long <= long long.char isn't guranteed to be one byte
If you are worrying about this, why not use long or long long instead of int? They might be bigger than int.
int endianess(void)
{
union{
long long l;
char c[sizeof(long long)];
} n = {1};
return n.c[0];
}
Also check out stdint.h, if the compiler you use supports it.

Find content
Not Telling
