Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Fallo matriz
#include <stdio.h> #include <stdlib.h> #include <time.h> int main ( ) { int **matriz ; int filas = 4 ; int columnas = 4 ; matriz = (int**)malloc(filas*sizeof(int*)); if (matriz == NULL){ printf("no se pudo reservar espacio en la memoria"); exit(1); } for (int i = 0 ; i < filas ; i++){ matriz = (int**)malloc(columnas*sizeof(int*)); } srand(time(NULL)); for(int i = 0 ; i < filas ; i++) for(int j = 0 ; j < columnas; j++){ matriz[i][j]= rand()%4; printf("%d%d ",matriz[i][j]); } printf("\n"); }
run
|
edit
|
history
|
help
0
18BCE2182 ASSESS_1 Q1-2
C(gcc) Local Time and math.h Example
Test 3
-Wall
BSEARCH() COMPLETE
hwkpractice
Hello
123
C_141106_Divisores
Sunday assignment v2