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

标签 c arrays pointers

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/

相关文章:

c - C语言 : pointer to integer conversion assigning to 'char' from 'char [2]'

javascript - 如何返回 50 的数组

c++ - 如何使指针指向 NULL

c - 如何获取指针指向的内存大小?

c - 获取安装在 solaris 11.2 机器上的卷列表

c - 哪种数据结构在 C 中被广泛使用?

Java:对象的封装和数组

c - 使用指针算术反转字符串

c - 仅打印长度超过 10 个字符的输入行 (ANSI C)

arrays - 如何将简单(平面)数组转换为多维(2D)数组