logo

Crowdly

Consider (as usual in 64-bit machines) that values of type int , and char are...

✅ 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 int, and char

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)?

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;

}

100%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle2425.up.pt?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!