The outputs should be 10 and 40( considering sizeof(int) = 4) but while printing, sizeof(arr) is 4. Why is this so ? I am leaving a screenshot of my code below.
int n = 10, *arr;
arr = ( int * ) malloc ( sizeof(int) * n );
The outputs should be 10 and 40( considering sizeof(int) = 4) but while printing, sizeof(arr) is 4. Why is this so ? I am leaving a screenshot of my code below.
int n = 10, *arr;
arr = ( int * ) malloc ( sizeof(int) * n );