Create an array which size changes as you input values ? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Create an array which size changes as you input values ?

Well Hello, Does anyone know if it possible to create an array which size changes when you input its elements ? Thanks in advance, A

13th Aug 2021, 4:19 PM
Ambre Rouquié
3 Réponses
+ 4
In c, There's no built-in dynamic array, you'll just have to write one yourself. You can make it by using dynamic memory allocation: An example: https://code.sololearn.com/cdWU2IqJbIg4 Reference: https://www.geeksforgeeks.org/what-is-dynamic-memory-allocation/
13th Aug 2021, 4:45 PM
The future is now thanks to science
The future is now thanks to science - avatar
+ 1
Ambre Rouquié How about a dynamic array?
13th Aug 2021, 4:36 PM
Calvin Thomas
Calvin Thomas - avatar
0
Hey all, thank you very much for your answers !
18th Aug 2021, 6:21 PM
Ambre Rouquié