✅ 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 are represented using 4 and 1 bytes in memory, respectively. What is the output of the following program (assuming no padding is necessary for the struct types involved)?int
, and char
struct event {
char id[4];
int code;
};
struct week {
int number;
event events[7];
};
int main() {
week w;
std::cout << sizeof(w) << '\n';
return 0;
}
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!