Intern — Middle
Determining the output of the structure size in the console
livecode
Task condition
It is necessary to understand what result will be printed when the following program is run.
# include <cstdint>
# include <iostream>
# pragma pack(4)
struct A
{
uint64_t Value1 = 10;
uint32_t Value2 = 20;
uint16_t Value3 = 30;
};
int main()
{
std::cout << sizeof(A) << std::endl;
return 0;
}