What is the difference between big endian form and little
endian form? write a code to convert big endian form to
little endian and vice versa..
Answer Posted / raj
Little Endian ->LSB at lower address
Big Endian -> MSB at lower address
e.g:
if the value is 0x0A0B0C0D then
in case of LE storage will be
Address 1000 0D
Address 1001 0C
Address 1002 0B
Address 1003 0A
in case of BE storage will be
Address 1000 0A
Address 1001 0B
Address 1002 0C
Address 1003 0D
Marco to convert(this will convert from LE to BE or BE to
LE--> one for all :) )
#define CON(NUM) (NUM&0x000000FF)<<24|(NUM&0x0000FF00)<<8
|NUM&0x00FF0000)>>8 |(NUM&0xFF000000)>>24
| Is This Answer Correct ? | 17 Yes | 3 No |
Post New Answer View All Answers
What is function what are the types of function?
What is main () in c language?
What is extern keyword in c?
Explain can static variables be declared in a header file?
I have a varargs function which accepts a float parameter?
What is an lvalue?
What are header files in c?
Write a program to swap two numbers without using third variable in c?
What is the difference between exit() and _exit() function in c?
Differentiate between static and dynamic modeling.
What is the correct declaration of main?
What does *p++ do? What does it point to?
What is the difference between near, far and huge pointers?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What is 2c dna?