[ create a new paste ] login | about

Link: http://codepad.org/AF7eYIZM    [ raw code | output | fork ]

C, pasted on Apr 20:
1
2
3
4
5
6
7
8
9
10
11
12
13
int main(void)
{
    printf("sizeof(\"0xff\") = %u\n", sizeof("0xff"));
    printf("sizeof(char*) = %u\n", sizeof(char*));

    int days[] = {1,2,3,4,5};
    int *ptr = days;
    printf("sizeof(days) = %u\n", sizeof(days));
    printf("sizeof(ptr) = %u\n", sizeof(ptr));


    return 42;
}


Output:
1
2
3
4
5
6
sizeof("0xff") = 5
sizeof(char*) = 4
sizeof(days) = 20
sizeof(ptr) = 4

Exited: ExitFailure 42


Create a new paste based on this one


Comments: