E
EricLi
*typedef struct ct_data_s {
union {
long freq; /* frequency count */
long code; /* bit string */
} fc;
union {
char dad; /* father node in Huffman tree */
char len; /* length of bit string */
} dl;
} ct_data;
void main( )
{
int i = sizeof( ct_data );
}*
why does i equal 8?
I think the result is 5(sizeof(long)+sizeof(char))
-
EricL
union {
long freq; /* frequency count */
long code; /* bit string */
} fc;
union {
char dad; /* father node in Huffman tree */
char len; /* length of bit string */
} dl;
} ct_data;
void main( )
{
int i = sizeof( ct_data );
}*
why does i equal 8?
I think the result is 5(sizeof(long)+sizeof(char))
-
EricL