变量字节

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

unsigned short=2

short=2

int=4

char=1

unsigned char=1

float=4

unsigned float=4

double=8

 

很简单,不过经常晕呵呵

posted @ 2013-10-25 10:21  wwjdwy  阅读(263)  评论(0)    收藏  举报