<br /> lAddress=(unsigned short)(address32&0xffff); //should be 0x5678<br /> hAddress=(unsigned short)(address32>>16); //should be 0x1234<br /> printf("the sizeof long is %x,the sizeof short is %x
",sizeof(long),sizeof(short));<br /> printf("the Address is %x
",address32);<br /> printf("the lAddress is %x
",lAddress);<br /> printf("the hAddress is %x
",hAddress);<br /> printf("finished");
|