how to find your architecture is LittleEndian or BigEndian?
Answer / 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 |
Explain what is the best way to comment out a section of code that contains comments?
how to exchnage bits in a byte b7<-->b0 b6<-->b1 b5<-->b2 b4<-->b3 please mail me the code if any one know to rajeshmb4u@gmail.com
with out using main how to execute the program?
Q-1: Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college.
difference between native and cross compilers
What ios diff. Between %e & %f?
Write a function in c to find the area of a triangle whose length of three sides is given.
Write a program to identify if a given binary tree is balanced or not.
errors in computer programmes are called
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
difference between string and array?
how to execute a program using if else condition and the output should enter number and the number is odd only...