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];
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];
No, since it is allocated on stack.
I found this thread useful after typing my answer: C++ Static Array VS Dynamic Array