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..

Answers were Sorted based on User's Feedback



What is the difference between big endian form and little endian form? write a code to convert big..

Answer / peter

Little endian has least significant digit at far left.
Big endian has most significant digit at far left.

Is This Answer Correct ?    28 Yes 8 No

What is the difference between big endian form and little endian form? write a code to convert big..

Answer / 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

What is the difference between big endian form and little endian form? write a code to convert big..

Answer / amit

the endianness of a bus determines whether the MSB is put
into the lowest address
(big-endian) or in the highest address (little-endian).

Is This Answer Correct ?    13 Yes 5 No

What is the difference between big endian form and little endian form? write a code to convert big..

Answer / vivek

in little endien lsb is at lower addess and in big endien
msb at lower address

Is This Answer Correct ?    1 Yes 0 No

What is the difference between big endian form and little endian form? write a code to convert big..

Answer / vish

Small correction in above macro.
'(' was missing in second line.

#define CON(NUM) (NUM&0x000000FF)<<24|(NUM&0x0000FF00)<<8
|(NUM&0x00FF0000)>>8 |(NUM&0xFF000000)>>24

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More C Interview Questions

How to find a missed value, if you want to store 100 values in a 99 sized array?

0 Answers   Honeywell, Zomato,


what is c language?

2 Answers  


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

0 Answers  


Can you please explain the difference between exit() and _exit() function?

0 Answers  


What are the back slash character constants or escape sequence charactersavailable in c?

0 Answers  


What is nested structure in c?

0 Answers  


1.Why do you call C is middle level language? 2.Why do you call C is userfriendly language.

2 Answers  


What is extern c used for?

0 Answers  


#include<stdio.h> void main() { int a=5,b=6,c; int x=(a<b)+7; int y=(x==7)*9; int z=(c=x+y)*2; printf("%h %h %h",x,y,z); } What is the output? Explain it.

8 Answers   IBM,


Explain #pragma statements.

0 Answers  


What is variable initialization and why is it important?

0 Answers  


write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

0 Answers   ADP,


Categories