int * set;
printf("-- %d --", sizeof(set));
set=(int *) malloc(n*sizeof(int));
printf("-- %d --", n*sizeof(int));
hope this helps. in your last statement, you still set the size of the individual integer pointer, which was 4 bytes on your computer. to get the size of your memory area, you need to use the same expression as inside the malloc function.
and the integer pointer doesn't necessarily have the same size as the int itself, since Mat corrected me to
0xor1 source
share