size2 != size1.Code:int array[] = { 1, 2, 3, 4, 5 }; int* ptr = array; int size1 = sizeof( array ) / sizeof( int); int size2 = sizeof( ptr ) / sizeof(int);
I know why they are different from technical point of view, but why should they behave differently ?