gpt4 book ai didi

c - C 编程的指针和数组(基础)

转载 作者:行者123 更新时间:2023-11-30 20:13:58 27 4
gpt4 key购买 nike

int a[3];
int *p = a;

存储在与p关联的内存位置的值是多少?

找到的内存地址存储的值是多少?

它是否指向名称“a”或数组第一个槽的地址或 "a"

中第一个元素的值

最佳答案

what is the value stored at the memory location associated with p is?

它存储a第一个元素的地址。

What is the value stored at the memory address found?

不清楚你的意思。

does it point to the name "a" or the address of the first slot of the array or the value for the first element in "a"

p 是内存中某个位置的别名。该内存中的值是a第一个元素的地址。它不指向名称a

关于c - C 编程的指针和数组(基础),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28269509/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com