749100653 发表于 2021-1-17 18:16:57

关于数组的问题,求大佬帮忙

本帖最后由 749100653 于 2021-1-17 18:20 编辑

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAFaCAYAAACKQ0E7AAAgAElEQVR4nO3da3QV5aE38PlS16v19EDxhPesdc6iri4vVVpPkYtCtKKtKB4Lgp7qqhUMJIoNLaDYD32Lrve0oBgIGkmtXAR6jhojiJgExEqr53isdEmVS+6BhJAQLgIJSJOd7PmfD5tn8uxnz8yemX1/8l/L35LM7HlmZl/++7nMfsaACcAEdvRU48kj86Ps6KmGWE9ElGsM8Y90B9zAsV14YclTeOtzMynl7al4Gk8tWYKnliwJXObAsV148Vevow7JOaZUCTWvxhvGfLRJxxlqXo2Kr30DH1SFEy4/jHexQymfKBelLOBMdGFnWQXqYOLIrnL85vXPo9YnO+DEPt99MXiZmQ44E0346NZvxg0pBhyRNykLuDD24bX/NxhwL//haMpPJhsDrrt8OpqK3/V4/MEDLpniBVx3+XS0vdCU8teTKFEpCbgju8qt5qLs/5f9AcdhOjYnRSj+Yddqa70ajPK2TythZBdwctDCjA0xUZO0K1Nd5zc4jy/4NhpuK0efdIyiprVm+CisGT4KW1c1AibQWTbVWma59HZ81mDabrdGCqDa4ius5Wo4qtt5qeGJgGvYsSDmON3OjSjbpKwGN3BsF8qlQFPDwSmMXl3ylNWcDe17Iypw9lQ8HdPU9VKmU8CJ/YnHq+vk7cLYh1d/9SI+7DLjnnsY76H169fa1nJqi69wDBmnGlwY72L7xZdby+1qcHbbhppXo+KiKdEhKf3tfPyR/b0yrwYwgd4dC6ICVegun45643Gcg3t5RJmSsoAL7XsDv3n9c0T64mKDIVAYxQkYv2WG9r1h1SrVdWrtLSJ+wIVaXkLTiGvQVWP/OFFTE+ERffz2Ade7YwHWfa8Mpy8cp9eA6yybGrMft4AdfM6im6huTeLenYtRP+yHONXo/rwQZULSA06EjF0TVW5uZnvAqev8EDU4t7633gvNPzmAci3gWIOjbJeyGpwYWFADRvAbRuLx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QOOaOhIahPV7t92Er0Ozsv+/DZh2QdHpJ+k1uC8NDudmqhemq5O6700f700jzmKSqQX/haViLTFgCMibTHgiEhbDDgi0hYDjoi0lfSA4wgkEWWLjEx4SUSUDqzBEZG2GHBEpC0GHBFpiwFHRNpiwBGRthhwRKQtBhwRaYsBR0TaSsmFvrzgl4iyAX+LSkTaYsARkbYYcESkLQYcEWmLAUdE2mLAEZG2GHBEpC0GHBFpiwFHRNpiwBGRthhwRKSt/wXslHBUJx0ZYQAAAABJRU5ErkJggg==定义数值 int a={1,2,3,4,5,6,7,8,9,0}; 里面 &a的值是和&a的值相等的,但是a和a的值是不一样的。a和a为什么地址相同?是存储在同一个地方的吗?为什么a和a的存放地址相同但是值却不同?一个地方挤进去了两个数值?

qiuyouzhi 发表于 2021-1-17 18:19:44

数组名就是数组的第一个元素的地址。

749100653 发表于 2021-1-17 18:21:53

qiuyouzhi 发表于 2021-1-17 18:19
数组名就是数组的第一个元素的地址。

a和a存放同一个地址?

qiuyouzhi 发表于 2021-1-17 18:22:18

749100653 发表于 2021-1-17 18:21
a和a存放同一个地址?

差不多吧

749100653 发表于 2021-1-17 18:24:41

qiuyouzhi 发表于 2021-1-17 18:22
差不多吧

存放在同一个地址 那意思就是 a相当于a?那为什么a的值是一个地址而a的值是第一个元素的值?

qiuyouzhi 发表于 2021-1-17 18:25:52

749100653 发表于 2021-1-17 18:24
存放在同一个地址 那意思就是 a相当于a?那为什么a的值是一个地址而a的值是第一个元素的值?

a代表元素,a代表的才是地址
应该是a = &a

749100653 发表于 2021-1-17 18:27:48

qiuyouzhi 发表于 2021-1-17 18:25
a代表元素,a代表的才是地址
应该是a = &a

但是你不是说a和a存放在同一个地址吗 ,那a和a的值不应该是同一个数吗

昨非 发表于 2021-1-17 18:28:29

749100653 发表于 2021-1-17 18:21
a和a存放同一个地址?

数组名本身就是首地址

749100653 发表于 2021-1-17 18:28:32

qiuyouzhi 发表于 2021-1-17 18:25
a代表元素,a代表的才是地址
应该是a = &a

一个地址可以存放多个值?

749100653 发表于 2021-1-17 18:29:47

昨非 发表于 2021-1-17 18:28
数组名本身就是首地址

我知道 但是数组名的地址为什么等于a的地址这不就代表两个应该是同一个数吗?难道同一个地址可以存储多个数吗?

qiuyouzhi 发表于 2021-1-17 18:30:59

749100653 发表于 2021-1-17 18:28
一个地址可以存放多个值?

不是,你理解的有问题
a和a的地址是相同的,存放的值也是相同的
a这种取值方法本来就是一种语法糖,方便程序员使用而发明的
*(p + i) = a

749100653 发表于 2021-1-17 18:32:00

qiuyouzhi 发表于 2021-1-17 18:30
不是,你理解的有问题
a和a的地址是相同的,存放的值也是相同的
a这种取值方法本来就是一种语法 ...

哦哦明白了我蒙圈了一下午

昨非 发表于 2021-1-17 18:33:50

749100653 发表于 2021-1-17 18:29
我知道 但是数组名的地址为什么等于a的地址这不就代表两个应该是同一个数吗?难道同一个地址可以 ...

将数组比作火车,火车名(数组名)定义为火车头的位置(首地址),
那么问,为什么火车名不能等于火车最前端的位置(a)

jackz007 发表于 2021-1-17 18:46:24

   a 代表整个数组,同时,也是整个数组在内存中的起始地址,说它是第一个元素的地址也是对的,a , & a , & a 都是一个意思,都是数组第一个元素的地址。
   前者都是指针,其数值是内存地址,而 a、a ... 就完全不同了,a 是数组的第一个元素,a 是数组的第二个元素。我们之所以要定义数组,根本目的就是要储存和访问其中的元素。
页: [1]
查看完整版本: 关于数组的问题,求大佬帮忙