close

16.試撰寫一程式,利用sizeof關鍵字查詢各種資料型態所佔的位元組:
(a)unsigned int
(b)double
(c)unsigned short int

#include <stdio.h>

#include <stdlib.h>

int main (void)

{

printf("sizeof(unsigned int)=%d\n",sizeof(unsigned int));

printf("sizeof(double)=%d\n",sizeof(double));

printf("sizeof(unsigned short int)=%d\n",sizeof(unsigned short int));

 

system ("pause");

return 0;

}

arrow
arrow
    文章標籤
    作業 CH3
    全站熱搜

    小宥韓諾非 發表在 痞客邦 留言(0) 人氣()