APPLICATION LAYER
SOCKET INTERFACE PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Size of Socket
|
|
Network Byte Ordering
|
|
Network Bit Size
|
|
Brothers of Endian
|
Detailed explanation-1: -Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most significant byte of a word at the smallest memory address and the least significant byte at the largest. A little-endian system, in contrast, stores the least-significant byte at the smallest address.
Detailed explanation-2: -Big endian is how we normally deal with numbers: the most significant byte or digits are placed leftmost in the structure (the big end). Known as the “network byte order, ‘’ the TCP/IP Internet protocol also uses big endian regardless of the hardware at either end.
Detailed explanation-3: -If it is little-endian, it would be stored as “01 00 00 00”. The program checks the first byte by dereferencing the cptr pointer. If it equals to 0, it means the processor is big-endian(“00 00 00 01”), If it equals to 1, it means the processor is little-endian (“01 00 00 00”).