like in the video it says ;
int *ptr = new int[100000];
and if we do sizeof(ptr),then its prints output as 4 ;
So is there any way to print the size of new int[100000] array??
Is there any ways to print the size of the array if it is located in dynamic memory
it print 4 as ptr is pointer to int
hence size of ptr will be 4
there is no way to calculate size of integer array
that is why every time we pass array with it’s size in function
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.