Computer Science, asked by upadhyayprincebby, 9 months ago

गिव एग्जांपल ऑफ डायनेमिक मेमोरी एलोकेशन​

Answers

Answered by Anonymous
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 rini9454
0

Explanation:

plz mark me as brainliest

Attachments:
Similar questions