When I print this out, is it suppose to be two identical columns? Also the last number I see for both columns is -2147483648, is there something wrong with that?
Code:
#include <stdio.h>
int main( int argc, char *argv[] ){
int x = 1;
unsigned int y = 1;
int i;
int limit = sizeof(int) * 8;
printf("The value for x is %d. \n", x);
printf("The value for y is %d. \n\n", y);
printf("Signed \t\t Unsigned \n");
for(i = 0; i < limit - 1; i++){
x = x << 1;
y = y << 1;
printf("%d %20d \n", x, y);
}
return 0;
}