DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Ejemplo De Matrices En C
Se crea un matrix dinamica en c, y luego se muestra, el tamano de muestra siempre es de 10x10
#include <stdio.h>
#include <stdlib.h>
void mostrar(int **a){
int i,j;
for (i=0;i<10;i++){
for (j=0;j<10;j++){
printf("%i",a[i][j]);
}
printf("\n");
}
};
int main(){
int i,j,**a;
a=(int**)malloc(10*sizeof(int*));
for (i=0;i<10;i++){
a[i]=(int*)malloc(10*sizeof(int));
for (j=0;j<10;j++){
a[i][j]=i;
}
}
mostrar(a);
getchar();
return 0;
}





