I want to read sizeof(int) bytes from a char* array.
sizeof(int)
char*
a) In what scenario\'s do we need to worry if endianness needs to be checked?
Do you mean something like that?:
char* a; int i; memcpy(&i, a, sizeof(i));
You only have to worry about endianess if the source of the data is from a different platform, like a device.