[请问] 请问一题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