how to find your architecture is LittleEndian or BigEndian?
Answer Posted / kirankumaryakkala
ans. by using unions we can find it see.
union
{
char ch[2];
int i;
}u;
u.i=512;
printf("%d %d",u.ch[0],u.ch[1]);
printf("%d",u.i);
basically u will see this type of implementation while u r
going through some C books.
depending on the storage seen at ch[0],ch[1] u can find.
u can find the output as ch[0]=0,ch[1]=2 \\little endian
(or) ch[0]=2,ch[2]=0\\bigendian
like this u can find the endian....
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What are high level languages like C and FORTRAN also known as?
Is main a keyword in c?
How can you find out how much memory is available?
Under what circumstances does a name clash occur?
Explain about the constants which help in debugging?
What are header files and what are its uses in C programming?
Are bit fields portable?
please give me some tips for the placement in the TCS.
is it possible to create your own header files?
How do shell structures work?
What is the difference between malloc calloc and realloc in c?
Can math operations be performed on a void pointer?
hi, which software companys will take,if d candidate's % is jst 55%?
How can you increase the size of a dynamically allocated array?
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.