I'm experiencing a problem. I'm trying to get the number of elements in an int array, without passing any explicit parameter, just the pointer to the int array. Now my curiosity:
int * set;
printf("-- %d --", sizeof(set)); //4
set=(int *) malloc(n*sizeof(int));
printf("-- %d --", sizeof(set)); //4
Why are the values the same since before the malloc it isn't initialized and after it is. Thanks
UPDATE:
Is there any way to get the length of an int array?