+ 2

Free memory in C Programming

How can I free memory of an array of pointers without knowing the size of the array? For example: char *planet[]

8th Apr 2021, 3:35 PM
feof
feof - avatar
4 Answers
+ 3
thank you [user id=11932555]Coder Kitten[/user]
8th Apr 2021, 4:13 PM
feof
feof - avatar
+ 2
The array is used as parameter for a function. Thanks all, I solved the problem by using pointer to pointer to traverse though the array. [user id=2241489]Martin Taylor[/user] [user id=11932555]Coder Kitten[/user]
8th Apr 2021, 9:54 PM
feof
feof - avatar
0
Thanks 🌹 for the Help
19th Aug 2021, 11:46 AM
Shubham Bhatia
Shubham Bhatia - avatar
0
char **planets; planets = malloc(sizeof(char*) * 8); this function is use for the memory of numbers in c.
13th Sep 2021, 5:16 PM
Shubham Bhatia
Shubham Bhatia - avatar