1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
printf("\nThe int min is: " -(((int) pow(2, sizeof(int)*8-1)-1)+1));
printf("\nThe int max is: " ,(((int) pow(2, sizeof(int)*8-1)-1)+1));
printf("\nThe unsigned int max is: " ,(((unsigned int) pow(2, sizeof(int)*8-1)-1)*2+1));
//The computation of the largest and smallest long, signed and unsigned.
printf("\nThe long min is: " -(((long) pow(2, sizeof(long)*8-1)-1)+1));
printf("\nThe long max is: " ,(((long) pow(2, sizeof(long)*8-1)-1)+1));
printf("\nThe unsigned long max is: " ,(((unsigned long) pow(2, sizeof(long)*8-1)-1)*2+1));
//The computation of the largest and smallest short, signed and unsigned.
printf("\nThe short min is: " -(((short) pow(2, sizeof(short)*8-1)-1)+1));
printf("\nThe short max is: " ,(((short) pow(2, sizeof(short)*8-1)-1)+1));
printf("\nThe unsigned short max is: " ,(((unsigned short) pow(2, sizeof(short)*8-1)-1)*2+1));
|