How to find machine is Big/little endian?
Hi,
Can any one tell me that how to find machine on which we are working i.e. Big/Little Endian in using java?
One of my friend told me that in C Programming we can find this by using following code:
#include <stdio.h>
#include <arpa/inet.h>
int main(){
if (htons(1) == 1) puts("big endian");
else puts("little endian");
return 0;
}
Can any one help me in solving this mystery?
Cheers,
Ram

