Will a char array differ in ordering in a little endian or big endian system

前端 未结 4 877
[愿得一人]
[愿得一人] 2021-02-02 03:11

I have an array char c[12] = {\'a\',\'b\',\'c\',\'d\',\'e\',\'f\',\'g\',\'h\',\'0\',\'1\',\'2\',\'3\'} In hexadecimal these values would be {0x61, 0x62, 0x63,

4条回答
  •  鱼传尺愫
    2021-02-02 03:49

    char arrays are the same on any reasonable system that you will ever encounter. Its the multi byte data types that have differemt ordering. Systems that have odd endianess of the bits existed in the past, but I dont think any of those are made any more.

提交回复
热议问题