//In this program we will explore the array structure in c or c++;
//In this exercise we will make an small array and try to look at its momory address, array are supposed to have the continuous memory allocation.
#include<iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
int a[]={1,2,3,4,5,6};
//to print size of single element we use sizeof(a[i]) and to find length of an entire array we will use
int array_len=sizeof(a)/sizeof(a[0]);
cout<<"size of single element in bytes is :"<<sizeof(a[0])<<" where as size of whole array is "<<sizeof(a)<<endl<<"the memory address of these elements are given as with their values"<<endl;
cout<<"Memory address \t value stored "<<endl;
for (int i=0;i<array_len;i++){
cout<<&a[i]<<"\t"<<a[i]<<endl;
}
}