+ 1
What is the practical purpose of dynamic memory allocation either in c or cpp?
I have just learnt about dynamic memory allocation, After seeing a lot of videos and reading many examples, I understood what it is. But now,how and where to use excatly?
3 ответов
+ 9
Dynamic memory allocation is mainly used while working with pointers.
If you declare a pointer, but you don't want it to point at other variable, then you can use dynamic memory allocation to use that pointer.
+ 6
Vikranth Paluri Pleased to help you😊
+ 1
Got it!
Thanks bro✌🏻✌🏻