गिव एग्जांपल ऑफ डायनेमिक मेमोरी एलोकेशन
Answers
Answered by
0
Answer:
Dynamic Memory Allocation. ... Dynamic memory management in C programming language is performed via a group four functions named malloc(), calloc(), realloc(), and free().
These four dynamic memory allocation functions of the C programming language are defined in the C standard library header file <stdlib. h>
which are
malloc(), calloc(), free() and realloc()
Syntax of malloc()
ptr = (castType*) malloc(size);
Example
ptr = (float*) malloc(100 * sizeof(float));
Syntax of calloc()
ptr = (castType*)calloc(n, size);
Example:
ptr = (float*) calloc(25, sizeof(float));
Syntax of free()
free(ptr);
Syntax of realloc()
ptr = realloc(ptr, x);
hope its helpful friend!
If u like this then mark as brainlist
Answered by
0
Explanation:
plz mark me as brainliest
Attachments:
Similar questions
Math,
4 months ago
English,
4 months ago
English,
4 months ago
Computer Science,
9 months ago
English,
9 months ago