Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C

Name: Anonymous 2011-03-12 1:32

Hi /prog/

I just notice this strange thing in C:

int a[4];
#define n (sizeof(a) / sizeof(a[0]))
int d = n;

if (-1 < n) {
    printf("yup\n");
}

if (-1 < d) {
    printf("cuack\n");
}

Why is that it doesn't print "yup"?

Name: Anonymous 2011-03-12 8:15

>>5
I mena
1 << sizeof(int) * CHAR_BIT

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List