若有以下定义和语句: int a[10]={1,2,3,4,5,6,7,8,9,10},*p=a : 则不能表示a数组元素的表达式是 。 A. *p B. a[10] C. *a D. a[p-a]
时间: 2024-03-11 22:44:17 浏览: 559
不能表示 a 数组元素的表达式是 B. a[10]。因为数组下标从 0 开始,所以 a 数组的最后一个元素的下标是 9,而不是 10。因此,a[10] 不是一个合法的数组元素表达式。而其他选项都是合法的表达式。*p 表示 a 数组的第一个元素,即 a[0];*a 也表示 a 数组的第一个元素,即 a[0];a[p-a] 是一个复杂的表达式,但是它是合法的,表示 p 指向的地址距离 a 数组的首地址相差几个 int 类型的单位,即 p 和 a 的地址差除以 sizeof(int)。
阅读全文
相关推荐
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![text/x-c](https://img-home.csdnimg.cn/images/20250102104920.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![rar](https://img-home.csdnimg.cn/images/20241231044955.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pptx](https://img-home.csdnimg.cn/images/20241231044947.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)