struct test { char c; // 1 byte int i; // 4 bytes }sample1, sample2; cout << sizeof (sample1);. Outputs 8 bytes. Why is it 8 instead of 5?
確定! 回上一頁