What is the alternative for global pointer in c for implementing dynamic array? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

What is the alternative for global pointer in c for implementing dynamic array?

I have to declare an dynamic array in one function and use it in multiple functions.

1st Feb 2018, 3:52 PM
Aditya Tambuskar
Aditya Tambuskar - avatar
2 Réponses
+ 1
Thanks
1st Feb 2018, 4:58 PM
Aditya Tambuskar
Aditya Tambuskar - avatar
0
Just pass the pointer between the functions.
1st Feb 2018, 4:49 PM
Vlad Serbu
Vlad Serbu - avatar