Computer Science, asked by anjalimahali6393, 1 year ago

How to allocate memory dynamically for array in c?

Answers

Answered by PrinceRajj
1
The memory set aside by malloc is not initialized and may contain cruft: the remnants of previously used and discarded data. After allocation with malloc , elements of the array are uninitialized variables. The command calloc will allocate and clear thememory in one step: int *array = calloc(10, sizeof (int));
Similar questions