[請問] 請問一題Row/Column major的問題

作者: iloveconic (樂陶陶)   2014-10-26 20:02:18
Assume in a byte machine. A is an array declared as
A[-1:m, 2:n] and each element occupied 3 bytes. The
address of A[3,5] ia at 180 and A[5,3] is at 138. Find
the address of the element A[-1,2]
這題想不太出來
我用Row major和Column major算出來的結果不一樣,請問要怎麼判定呢?
還請各位替小弟解惑~謝謝!!
作者: dcfgh (飲冰室雜魚)   2014-10-26 20:37:00
96,先看算式求m,再看表格。 http://ppt.cc/5j8r我是猜說記憶體從低址開始分配,不是很確定@@

Links booklink

Contact Us: admin [ a t ] ucptt.com