As long as you work at a value level, there will be absolutely no difference in the results you get, regardless of whether your machine is small or large. That is, while you use language level operators (for example, | and << in your example), you will get exactly the same arithmetic result from the above expression on any platform. The specificity of the machine is not detected and not visible at this level.
The only situations where you need to take care of the content is that the data you are working with is considered at the level of the object's representation, that is, in situations where it is important to have a representation of raw memory. What you said above about โ AB BC CD DE instead of DE CD BC AB โ specifically refers to the original location of the data memory. What functions as ntonl does: they convert one memory layout to another memory layout. Until you have indicated that the actual memory location is not important to you. It?
Again, if you only care about the meaning of the above expression, it is completely and completely independent of continent. Basically, you donโt have to worry about content capability at all when you write C programs that donโt try to access and study the contents of raw memory.
source share