dimanche 8 mars 2015

Why this C programming code output is False? expected output is true

We know that sizeof(int) = 4 and 4 > -1 is true so the expected output of the following piece of code is true.


However, it's printing "False". Why is wrong?



#include <stdio.h>

main(){
if (sizeof(int) > -1)
printf("True");
else
printf("False");
}

Aucun commentaire:

Enregistrer un commentaire