C语言描述:
#include <stdio.h> int main() { int a[][3]={1,2,3,4,5,6}; printf("%d",a[1][1]); }
汇编语言:
include irvine32.inc .data arr dword 1,2,3,41,52,63 dword 7,8,9,10,11,12 row dword 2 col dword 6 ;若输出第二行第三个,则:col+3 .code main proc mov esi,offset arr mov edx,col add edx,2 mov eax,[esi+4*edx] call writeint main endp end main
输出结果: