C Program for Dynamic Memory Allocation using malloc()

C Program for Dynamic Memory Allocation

C Program for Dynamic Memory Allocation using malloc() Below is a program on dynamic memory allocation using malloc() and clearing out memory space using free(). sizeof() returns the number of bytes occupied by any datatype, in this case by an integer. #include <stdio.h> int main() { printf(“\n\n\t\tEduguru – C Program Example\n\n\n”); int n, i, *ptr, sum = 0; printf(“\n\nEnter … Read more