logo

Crowdly

Browser

Додати до Chrome

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

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

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;

}

0%
0%
100%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moodle2425.up.pt?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome