I understand the basic concept of Static Arrays and dynamic arrays. The main difference between these two are one(Static Array) allocates memory at compile time, and the other at runtime. However, we can create static array whose size would be the user entered value.
int value ;
cin >> value ;
int array [value] ;
int i = 0 ;
while(i < value)
{
cin >> array[i] ;
i ++ ;
}
So the program doesn't know the size of this array, until runtime. So What's the actual fundamental difference between static and dynamic arrays then, if static array can also be made to allocate space on runtime??
Also, talking about the resizability of the array. To expand a dynamic array, we can delete the previous array after copying it's elements to a new double sized dynamic array. We can do the same with Static Arrays too right? [However, the original array can not be deleted in this case, and uses redundant stack space. IS this the only difference between S.Array and D.Array then]