Possible Duplicate: Stack pointer difference for char pointer and array
To illustrate my question:
int main(void){
int myary[20];
int *myaryPtr;
myaryPtr = myary;
sizeof(myary); // Will it return 80? Correct?
sizeof(myaryPtr); // Will it return 4? Correct?
return 0;
}
First off, is my assumption correct?
And then assuming my assumption is correct, what is the detailed explanation? I understand that my 20 element array is 80 bytes, but isn't the name myary
merely a pointer to the first element of the array? So shouldn't it also be 4?