数组元素访问

image

ACD

 

#include<iostream>
using namespace std;
int main()
{
int a[3][3]={{1,2,3},{4,5,6},{7,8,9}};
//a[2][2]
cout<<*(&a[0][0]+3*2+2)<<endl;
//cout<<*((a+2)[2])<<endl;
cout<<*(*(a+2)+2)<<endl;
cout<<*(a[2]+2)<<endl;
return 0;
}

posted @ 2012-10-13 19:08  10,000 hours coder  阅读(103)  评论(0)    收藏  举报