In my understanding,
Example1
cPtr = (char*)malloc(100);
Example2
1 char c = 0;
2 char* cPtr = &c
3 cPtr = (char*)malloc(100);
In Example1, malloc creates an memory space and returns the the first block of address of allocated memory. So cPtr gets an arbitrary address inside heap.
In Line 2 of Example2, cPtr is pointing to c. So cPtr has an address of c.
At this moment, when you execute line3 of Example 2, What would be the value of cPtr? Does it get an arbitrary memory address as I mentioned in Example1? Or, Does it keep the address of c and creates a spaces?