Dynamic arrays | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Dynamic arrays

What are dynamic arrays , dynamic variables?

4th Jun 2018, 7:01 PM
Fahadiqbal
2 Respostas
+ 4
Dynamic arrays and variables are created and are destroyed with the help of explicit operators. You explicitly specify how much memory to allocate for the object. For example, you should use operation "new" or function "malloc()" to create dynamic objects in c++ (to destroy dynamic objects you should use "delete" or "free()").
4th Jun 2018, 8:29 PM
Ivan Vladimirov
Ivan Vladimirov - avatar
0
So youā€™re saying that the variables that we create in heap in which we dynamically allocate memory to the variable using ā€œnewā€ operator are called dynamic variables
8th Jun 2018, 7:05 PM
Fahadiqbal