Finding out processor is little or big endian using c program
#include int main() { int num=1; char *cptr;
cptr = (char *)#
if (*cptr) printf ("little endian\n"); else printf ("big endian\n"); return 0; } ........................... for little endian it stores 00000001 for big endian it stores 00010000
No comments:
Post a Comment