Freeing memory for array in c++?

86 views Asked by At

Should the memory be freed for the array declaration like below and if so how? I only found delete for dynamic array allocation but no proper description for this kind of array.

char firstname[20];
1

There are 1 answers

0
taocp On

No, since it is allocated on stack.

I found this thread useful after typing my answer: C++ Static Array VS Dynamic Array