c - How are the structure members stored on a little endian machine? -


<पूर्व> struct डमी {int x; चारों ओर; }; Int main () {struct डमी डम; Dum.x = 10; Dum.y = 'a'; }

एक छोटी सी एंडियन मशीन पर संरचना के सदस्यों का लेआउट कैसा होगा?

क्या ऐसा कुछ होगा?

  0x1000 +0 +1 +2 +3 ___________________ x: | 10 | 0 | 0 | 0 | ------------------- y: | 'एक' | 0 | 0 | 0 | ------------------- 0x1000 +4 +5 +6 +7    

मुझे लगता है कि आपको उपयोगी मिलेगा अंत में आम तौर पर स्मृति में एक शब्द के लिए प्रासंगिक होता है, संपूर्ण संरचना के लिए नहीं।

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -