@kartik
there is nothing to do as how computer stores the data........some may be
little endian or big endian.
only thing that matters here is how the bits are being accessed.
computer accesses the bits from left to right.
you can ensure by running the following code
main()
{
int r=456;
int *p;
p=&r;
printf("%d\n",*((char*)p));
}
one more thing
can u guess what will be output of
typedef struct
{
int bit1:32;
}bit;
int main()
{
printf("%d\n",sizeof(bit));
}
and why??
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.