int max=(int)(((unsigned int)~0)>>1); int min=(int)((unsigned int)~max); printf("max=%d,min=%d/n",max,min); short maxs=(short)(((unsigned short)~0)>>1); short mins=(short)((unsigned short)~maxs); printf("maxs=%d,mins=%d/n",maxs,mins); char maxc=(char)(((unsigned char)~0)>>1); char minc=(char)((unsigned char)~maxc); printf("maxc=%d,minc=%d/n",maxc,minc);