USE OF MALLOC() AND REALLOC() AND FREE(ptr) in c
#include <stdio.h> #include <stdlib.h> int main () { // // use of malloc // int *ptr, n; // printf("Enetr the sie of the array you want to create\n"); // scanf("%d", &n); // ptr = (int *)malloc(n * sizeof(int)); // for (int i = 0; i < n; i++) // { // printf("Enter the value of no %d of this array\n",i); // scanf("%d", &ptr[i]); // } // for (int i = 0; i < n; i++) // { // printf("The value at %d of this array is %d\n",i,ptr[i]); // } // use of calloc int * ptr , n ; printf ( "Enetr the sie of the array you want to create \n " ); scanf ( " %d " , & n ); ptr = ( int *) calloc ( n , sizeof ( int )); for ( int i...