#include<stdio.h>
#include<malloc.h>
int main()
{
int r,c,i,j,**p;
printf(“How many rows,you want to insert: “);
scanf(“%d”,&r);
printf(“How many columns,you want to insert: “);
scanf(“%d”,&c);
p=malloc(r*c*sizeof(int));
printf(“Enter your %d*%d matrix elements: “,r,c);
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
scanf(“%d\n”,&(*(*(p+i)+j)));
}
for(i=0;i<r;i++)
{
for(j=0;j<c;j++)
printf(“%d”,*(*(p+i)+j));
}
}