Thursday, 3 April 2014

Endian-ness of the System


#include<iostream.h>
union
{
int a;
char b[4];
}obj;

int main()
{
obj.a=0x1;
cout<<obj.b[0]<<"    "<<obj.b[3]<<endl;
printf("%d    %d",obj.b[0],obj.b[3]);
}

No comments:

Post a Comment

AWS Data Pipeline Services

https://www.youtube.com/watch?v=tykcCf-Zz1M