0
Why we are using malloc,calloc functions ?without using this functions also memory allocated right?
C
2 Antworten
+ 1
There will come a time when we will need to use dynamic memory allocation. It's because storing huge amount of data in stack is a bad idea.
Also, malloc() and calloc() returns pointer, created in heap, which is transferable (between functions), while stack memory is locally scoped, and will be destroyed as the function ends.
https://www.sololearn.com/learn/C/2947/?ref=app