C语言 NULL与0 对应的地址

#include <stdio.h>

int main(int argc, char **argv) {
    
    int *p=0;
    int *q=NULL;
    
    printf("0 的地址是   %p \n",p);
    printf ("NULL 的地址是%p \n",p);
    
    return 0;
}

0 的地址是   (nil) 
NULL 的地址是(nil) 

猜你喜欢

转载自blog.csdn.net/luoganttcc/article/details/113774201