I've seen lots of places say:
In Turbo c and 16-bit range of Integer is -32768 to 32767 (0 to 65535) but in 32-bit and 64-bit range of Integer is -2147483648 [minimum value -2^31] to 2147483647 [maximum value 2^31-1]. But when we code and try to overflow the integer range like x=2147483649 c compiler returned x=-2147483647.
When we give (+ve) overflow value in x variable it returns (-ve) value or vise versa. And when we enter (+/-ve)2147483648 it always give (-ve) 2147483648 WHY ??
Example Code for better explanation
#include<stdio.h>
int main(){
int x;
x=2147483649;
printf("%d",x);
// if we give x=2147483649
// Output will be -2147483647
// if we give x=-2147483649
// output will be +2147483647
// if we give x=(+/-)2147483648
// output will ve always -ve 2147483648
return 0;
}