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
FILE_Access
InterviewDesk_Embedded
Multiple if statement v0.8
quadsort vs qsort
Practice Problem 7
Simple interest
Lab 10 v1
C dynamic string implementation using preprocessor
C_141113_dividirRestasSucesivas
20171117_FUNCIONES