I want to read sizeof(int)
bytes from a char*
array.
a) In what scenario\'s do we need to worry if endianness needs to be checked?
You need to worry about endianess only if the data you're reading is composed of numbers which are larger than one byte.
if you're reading sizeof(int) bytes and expect to interpret them as an int then endianess makes a difference. essentially endianness is the way in which a machine interprets a series of more than 1 bytes into a numerical value.