suppose i write a code as:
int main()
{
int i,a=2147483647;
if((2*a)<0)
printf("hello");
else
printf("world");
}
the output is world. but for :
int main()
{
int i,a=2147483647;
if((a+a)<0)
printf("hello");
else
printf("world");
}
The output is hello
.
How is this happening?
And where is the value of 2*a and a+a stored in memory(what is the datatype of the memory location?)