structure-packing

    35calore

    4risposta

    Eventuali duplicati: Why isn’t sizeof for a struct equal to the sum of sizeof of each member? consideri il seguente codice C: #include <stdio.h> struct employee { int id; char name[30];

    18calore

    9risposta

    Quando eseguo solo il frammento di codice int *t; std::cout << sizeof(char) << std::endl; std::cout << sizeof(double) << std::endl; std::cout << sizeof(int) << std::endl; std::cout << sizeof(t) <