suppose we have a byte-addressable machine,i.e.,each byte is accessed via an
address.Let the locations of an array be allocated in a row-major manner,and
each element takes one byte.What is the address of the element B[5][15][25]
in an array declared as B[10][20][30]?
Asume that the address of the first byte of the array is 5000.
解答是給:
5000+(5*20*30+15*30+25)*1 = 8475
我是算:
5000+(5*20*30+14*30+25)*1 = 8445
是否能請大大們撥空幫我算看看
謝謝
--
一切....
似乎不再那麼重要....
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.230.3.167