Warning: main(topsc.html) [function.main]: failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/little_bigendian.html on line 13

Warning: main(topsc.html) [function.main]: failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/little_bigendian.html on line 13

Warning: main() [function.include]: Failed opening 'topsc.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eng123/public_html/sourcecode/c/unix/little_bigendian.html on line 13


Warning: main(leftsc.html) [function.main]: failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/little_bigendian.html on line 16

Warning: main(leftsc.html) [function.main]: failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/little_bigendian.html on line 16

Warning: main() [function.include]: Failed opening 'leftsc.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eng123/public_html/sourcecode/c/unix/little_bigendian.html on line 16

Displaying  Source Code(s)  
 


Warning: main(adsc.html) [function.main]: failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/little_bigendian.html on line 31

Warning: main(adsc.html) [function.main]: failed to open stream: No such file or directory in /home/eng123/public_html/sourcecode/c/unix/little_bigendian.html on line 31

Warning: main() [function.include]: Failed opening 'adsc.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eng123/public_html/sourcecode/c/unix/little_bigendian.html on line 31

 
A PROG. To Find out the machine is Little or Big endian

--------------------------------------------------------------------------------

Description : Try to know first concept of how data store in little
& big endian machine register.Then take the concept of pointer,&try to
understand this code.


#include<stdio.h>
int main(void)
{
int i=1;
if((*(char*)&i)==1)
printf("The machine is little endian.<BR>);
else
printf("The machine is big endian.<BR>);
return 0;
}

 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG