✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Consider (as usual in 64-bit machines) that values of type double are represented using 8 bytes in memory and struct types defined as follows.data1
and data2
struct data1 {
double x;
double y;
};
struct data2 {
data1 a;
data1 b;
data1 c;
};
Assuming that no padding bytes are necessary in the representation of what is the output ofdata1
and data2
cout << sizeof(data1) << ' ' << sizeof(data2);
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!