数组名地址&数组首元素地址&数组地址都指向同一个地址

// Online C compiler to run C program online
#include <stdio.h>

int main() {
    int arr[3] = {1, 2, 3};
    printf("addr of arr : %p\n", arr);
    printf("&arr of arr : %p\n",&arr);
    printf("&arr[0] of arr : %p\n", &arr[0]);

    return 0;
}

image

posted @ 2024-06-08 22:21  stitchCat  阅读(8)  评论(0)    收藏  举报