Adobe Interview Question
Member Technical StaffsCountry: India
Interview Type: In-Person
The program should work regardless(as all the read/write will be in big endian on the same machine), the only difference is that if it is accessing some shared memory or more likely dependent on data from external source which is packing bytes in the little endian. It shouldnt be an issue as far as the network headers are concerned as these are in big endian anyways, for packed application data unless the endianess information is either encoded in the serialized data (or agreed as part of the protocol), you are out of luck.
first thing, why do we need to convert it at all..does it interact to other machines/shared storage ..if that is the case then we can use simple network apis to convert local machine format to big endian format(htonl) and vice-versa..
- amit February 18, 2014