Few bytes on NULL pointer in C

2 Likes
#include <stdio.h>

int main(void) {
    
    printf("%d\n", sizeof(NULL));
    
    int *ptr = NULL;
    printf("%d\n", sizeof(*ptr));
    
    printf("%d\n", sizeof(void));
    printf("%d\n", sizeof(void*));
    return 0;
}

1 Like
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?