✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
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);
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!