What is dynamic memory allocation explain with example?
Answers
Answered by
0
Answer:
“malloc” or “memory allocation” method in C is used to dynamically allocate a single large block of memory with the specified size. It returns a pointer of type void which can be cast into a pointer of any form. For Example: ptr = (int*) malloc(100 * sizeof(int));
Similar questions
Science,
6 months ago
Business Studies,
6 months ago
Science,
6 months ago
Math,
1 year ago
Physics,
1 year ago