base address of a simple array
Could any one tell how to get the base address of an array? or better if there is a predefined function that does this work?
Thanks in advance.
Here is what i did.
I have this but i have warnings...
int baseAddress = array; //should I write &array or *array ?? please help
printf("base address of array is: %ld\n",baseAddress);
"warning: initialization makes integer from pointer without a cast"
the result is always the same :
base address of array is: -1073743324
Actually i need it for another purposes than printing
That is why i used a baseAddress variable.
How can i get the address without using %p ?