P205. WAP to prove we are working in little endian environment using UNION.
#include<stdio.h>
union
U
{
char ch;
int i;
};
void
main()
{
union U u1;
u1.i=10;
if(u1.i==10)
printf("LITTLE ENDIAN
\n");
else
printf("BIG ENDIAN \n");
}
Comments
Post a Comment