I have a question about dynamic memory allocation in c or c++!
When we want to figure out the size of an array we use sizeof
function!
Furthermore,if we want to figure out the number of elements in which array has we do like this :
int a[20];
cout << sizeof(a) / sizeof(a[0]) << endl;
I was wondering if we could figure out the number and real size of memory which is allocated dynamically. I would really appreciate it if you tell me how, or introduce me to a reference.