please clarify whether my understanding of the following code is proper
#include..
void main()
{
int *p;
p=(int*)malloc(10*sizeof(int));
*p=100;
p=(int*)malloc(10*sizeof(int));
.....
.
.}
now the memory allocated in heap is 40 bytes or will it be twice of it....
and the value will be a garbage value or it will be 100
PLEASE EXPLAIN....