The complete code should look like this:
Code:
#include <stdio.h>
int main(void)
{
if (sizeof(int) > -1)
printf("True\n");
else
printf("False\n");
return 0;
}
Havn't you receive a warning?
My compiler throw one:
Code:
$ gcc -Wall -Wextra test.c -o test
test.c: In function ‘main’:
test.c:5:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (sizeof(int) > -1)
^
This means, your comparison should be:
Code:
if ((int) sizeof(int) > -1)
This cast the unsigned value from sizeof to an signed integer.