One solution would be (But you should worry about this aspect unless you really want to know).
 
main()
{
    int x=1;
    if((*(char*)&x)==1)
    {//Little Endian;}
    else
    {//Big Endian;}
}

karthik M keyan <[EMAIL PROTECTED]> wrote:

  Hai friends,

Can anyone write a program in C that would say

whether the given processor is Big endian or Little endian.

regards
karthik.





To unsubscribe : [EMAIL PROTECTED]




Yahoo! India Matrimony: Find your life partner online.

To unsubscribe : [EMAIL PROTECTED]




Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to