In my machine size of integer data type is 4 bytes so maximum value to the positive side is 2147483647 and to the negative side is -2147483648 in case of a signed int. consider the below c program
#include<stdio.h>
int main(void)
{
int a = 2147483648;
int b = -2147483649;
printf("%d",a);
printf("\n%d",b);
return 0;
}
output: -2147483647 2147483647
why a is implicitly getting converted to -2147483648 and b implicitly getting converted to 2147483647? and why I am getting only for line number 2 the below- given warning
"overflow in implicit constant conversion(-woverflow)"