作者x43758697000 (薄荷巧克力)
看板TransCSI
标题[问题] 列行 谁会算呢?
时间Fri Mar 5 18:54:26 2010
A 10*10 array A is stored in main memory using row-major arrangement. Its
starting address (address of A[0][0]) is 300, and the address of A[1][2] is
324. what is the address of the array element A[2][3]?
答案是347 可是我怎麽算都是351 到底错在那里阿
希望会的大大们 帮我解答
thx
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.47.8.133
1F:推 avogau:怎麽看起来像346 03/05 21:02
2F:推 andy74139:令此阵列每个元素为x bytes. 则 300+10*1*x+2*x = 324 03/05 21:17
3F:→ andy74139:故x=2, A[2][3]的位置为 300 + 10*2*x + 3*x = 346 03/05 21:18
4F:→ x43758697000:嗯 谢谢andy大 我知道怎麽算了 应该是346拉 03/06 09:10
5F:推 stator:嗯~我也是算346 03/07 18:13