How to check whether a system is big endian or little endian?
In C, C++
int n = 1; // little endian if true if(*(char *)&n == 1) {...}
See also: Perl version
1.4m articles
1.4m replys
5 comments
57.0k users