Ask your own question, for FREE!
Computer Science 13 Online
OpenStudy (anonymous):

As far as I know the members of a struct in C++ are stored one after the other in memory, yet when running this code I get odd results... http://prntscr.com/3ylrfd

OpenStudy (rsmith6559):

Considering that I.data is uninitialized and the pointer that's referencing it is for a one byte data type instead of a four or eight byte data type, I'm surprised that it compiles or runs.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!