Anonymous
public c v1 · immutable#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){ int **array; int i, j, rows, cols; printf("\nEnter Number of Rows: "); scanf("%d", &rows); printf("\nEnter Number of Cols: "); scanf("%d", &cols); array = malloc(rows * sizeof *array); for( i=0; i<rows; i++ ){ array[i]=malloc(cols * sizeof *array[i]); } for( i=0; i<rows; i++ ){ free(array[i]); } free(array); return EXIT_SUCCESS;}