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:
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 | |
|
|
Yahoo! Groups Links
- To reply to this message, go to:
http://groups.yahoo.com/group/Programmers-Town/post?act=reply&messageNum=4825
Please do not reply to this message via email. (more info)
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Programmers-Town/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
