标签:main
#include<windows>
void main( int argc,char * argv)
{
printf("The bytes of the variables are:\n");
printf("BYTE:%d bytes\n",sizeof(BYTE));
printf("int:%d bytes\n",sizeof(int));
printf("int:%d bytes\n",sizeof(unsigned int));
printf("char:%d byte\n",sizeof(char)); /* char型的字节数为1 */
printf("short:%d bytes\n",sizeof(short)); /* short型的字节数为2 */
printf("long:%d bytes\n",sizeof(long)); /* long型的字节数为4 */
printf("float:%d bytes\n",sizeof(float)); /* float型的字节数为4 */
printf("double:%d bytes\n",sizeof(double)); /* double型的字节数为8 */
int nint = 0xFFFFFFFF;
printf("%x\n",nint);
char chchar = 0x01;
printf("%x\n",chchar);
WORD wword = chchar<<8|chchar;
printf("%x",wword);
}
标签:main
原文地址:http://embeded.blog.51cto.com/3989210/1546933