ºìÁªLinuxÃÅ»§
Linux°ïÖú

CÓïÑÔ¹²ÓÃÌåÒ»¸öСÒÉÎÊ

·¢²¼Ê±¼ä:2012-05-01 23:32:42À´Ô´:ºìÁª×÷Õß:mr_tianwei
¶¨ÒåÒ»¸ö¹²ÓÃÌå
U {int a;}U1 printf("%d",sizeof(U1) // Çé¿ö1
U {char b;}U1 printf("%d",sizeof(U1) // Çé¿ö2
U {int a;char b;}U1 printf("%d,"sizeof(U1) //Çé¿ö3

´òÓ¡½á¹û£º4 , 1 , 8
ÎÒÏëÖªµÀΪʲôÇé¿ö3µÄ½á¹ûÊÇÕ¼8¸ö×Ö½Ú
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 7 ÌõÆÀÂÛ

  1. o_oxiaocai ÓÚ 2012-05-12 17:52:45·¢±í:

    ¸ÕÒª¿ªÊ¼Ñ§Äںˣ¬°ÑÒÔÇ°C¿Î±¾·­³öÀ´¿´ÁËÒ»±é£¬²»ÖªµÀ¹²ÓÃÌåÔÚÄÚºËÀïÃæÓõĶàô

  2. lzhj881506 ÓÚ 2012-05-09 14:25:15·¢±í:

    ѧϰÁË£¬Ð»Ð»¡£

  3. honglianqxw123 ÓÚ 2012-05-09 07:00:13·¢±í:

    ѧϰÁË£¬Ð»Ð»¡£

  4. Ïà˼°®ÎÄ ÓÚ 2012-05-07 22:34:06·¢±í:

    ÒýÓÃ:
    2# ÂÌÉ«Ê¥¹â
    ¶ÔÁË£¬ ºìÁªÀï·¢±íÁ˵ÄÌû×ÓÔõôɾµô°¡
    mr_tianwei ·¢±íÓÚ 2012-5-2 22:21

    Ìû×Ó·¢±íºó£¬µã±à¼­£¬¿ÉÒÔÐ޸ģ¬ÔÚûÓлظ´µÄÇé¿öÏ£¬¿ÉÒÔɾ³ý¡£
    Ìû×Ó±»»Ø¸´ºó£¬¾ÍÊôÓÚÉçÇø¹«¹²×ÊÔ´£¬Ò»°ã²»¿ÉÒÔɾ³ý£¬µ«°æȨÈÔ¹éÌûÖ÷ËùÓС£

    ÌرðÇé¿öÐèÒª´¦Àí£¬¿ÉÒÔʹÓõÀ¾ß»òÇë¹ÜÀíÔ±°ïæ¡£

  5. ÂÌÉ«Ê¥¹â ÓÚ 2012-05-03 08:09:48·¢±í:

    [i=s] ±¾Ìû×îºóÓÉ ÂÌÉ«Ê¥¹â ÓÚ 2012-5-3 08:11 ±à¼­ [/i]

    ÒýÓÃ:
    2# ÂÌÉ«Ê¥¹â


    ²»ºÃÒâ˼ÊÇÎÒ³ÌÐòÀïд´íÁË£¬ÊÇunion ²»Ð¡ÐÄдÁËstruct¡£¡£ ¶ÔÁË£¬ ºìÁªÀï·¢±íÁ˵ÄÌû×ÓÔõôɾµô°¡
    mr_tianwei ·¢±íÓÚ 2012-5-2 22:21

    µã»÷¡°±à¼­¡±£¬¹´Ñ¡ÓÒÉϽǵġ°É¾£¿¡±£¬±£´æ¡£

  6. mr_tianwei ÓÚ 2012-05-02 22:21:12·¢±í:

    2# ÂÌÉ«Ê¥¹â


    ²»ºÃÒâ˼ÊÇÎÒ³ÌÐòÀïд´íÁË£¬ÊÇunion ²»Ð¡ÐÄдÁËstruct¡£¡£ ¶ÔÁË£¬ ºìÁªÀï·¢±íÁ˵ÄÌû×ÓÔõôɾµô°¡

  7. ÂÌÉ«Ê¥¹â ÓÚ 2012-05-02 19:59:33·¢±í:

    Çé¿ö3Ó¦¸ÃÊÇ4°¡