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 |
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
what is the defrenece between structure and union
How the processor registers can be used in C ?
Differentiate between Macro and ordinary definition.
where do we use structure pointer?
Why cant I open a file by its explicit path?
What functions are used in dynamic memory allocation in c?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
What are identifiers c?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
count the numbers between 100 and 300, that star with 2 and ends with 2