#include<iostream> using namespace std; int main() { int arr[10]={1,2,3,4,5,6,7,8,9,20}; cout<<"整个数组所占内存空间为"<<sizeof(arr)<<endl; cout<<"每个元素所占内存空间为"<<sizeof(arr[0])<<endl; cout<<"数组的元素个数为"<<sizeof(arr)/sizeof(arr[0]) <<endl; cout<<"数组首地址为"<<(long long )arr<<endl; cout<<"数组中第一个元素地址为"<<(long long)&arr[0]<<endl; cout<<"数组中第二个元素地址为" <<(long long)&arr[1]<<endl; }
标签:longlong,输出,int,c++,64,类型 From: https://www.cnblogs.com/liuyanchao/p/17498598.html