This C code gives output "False" and the else
block is executing.
The value of sizeof(int)
is 4 but the value of sizeof(int) > -1
is 0.
I don't understand what is happening.
#include <stdio.h>
void main()
{
if (sizeof(int) > -1 )
{
printf("True");
}
else
{
printf("False");
}
printf("\n%d", (sizeof(int)) ); //output: 4
printf("\n%d", (sizeof(int) > -1) ); //output: 0
}