vendredi 31 juillet 2015

Why will the answer be no in this case? [duplicate]

#include <stdio.h>
int main()
{
    if (sizeof(int) > -1)
        printf("Yes");
    else
        printf("No");
    return 0;
}

According to me, sizeof(int) is 4 bytes which is greater than -1 and hence, it should print Yes but the output is no. Why is that?

Aucun commentaire:

Enregistrer un commentaire