C++ examples for Data Type:Array
An array has contiguous addresses
#include <iostream> using namespace std; int main() {/*w ww . j a va2s. c o m*/ int a[10]; cout << "sizeof(int) = "<< sizeof(int) << endl; for(int i = 0; i < 10; i++) cout << "&a[" << i << "] = " << (long)&a[i] << endl; }