How does the array stored in memory?
I have a simple program which initializes an array as:

int a[]={10,20,30,40,50};

char *p;

p=(char*)a;

Now I want to access the value at each byte through pointer 'p'. For that I need to know how does the array stored in memory(stack or heap)?

How does the array stored in memory?
===

I have a simple program which initializes an array as:

int a[]={10,20,30,40,50};

char *p;

p=(char*)a;

Now I want to access the value at each byte through pointer 'p'. For that I need to know how does the array stored in memory(stack or heap)?
