+ 2
Dynamic allocation basic(help)
what is benefit of dynamic allocation on this code.I can get user input at run time and print the output.in this program whether memory is deleted or not after close the program . https://code.sololearn.com/ctteq9dGFx3n/?ref=app
1 Resposta
+ 6
Note that some compilers do not allow variables in place of array size for array declaration.
int a[n];
Instead:
int* a = new int[n];
is universally accepted.