Hello everyone,
i am studying dynamic memory allocation in c,which can be done by using malloc calloc and realloc.
But still i don't understand the concept.
for eg
int *p;
p=(int*)malloc(100);
allocates 100 int size for p;

but if i don,t do p=(int*)malloc(100), *p is pointing to p we can always do p[i] and enter whatever values we want to store.
so what is actually happening at p=int*malloc(100);

also i found some example of using realloc and the too work fine if i remove the reallocating part.

someone help!!!