Last active
July 11, 2017 13:57
-
-
Save dimlucas/611dafb6f7c8ac3a75c51eb8a201b1a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int** matrix = malloc(10*sizeof(int*)); | |
if(matrix == NULL) | |
{ | |
fprintf(stderr, "Memory Allocation Failed\n"); | |
exit(EXIT_FAILURE); | |
} | |
int i; | |
for(i=0; i<10; i++) | |
{ | |
matrix[i] = malloc(5*sizeof(int)); | |
if(matrix[i] == NULL) | |
{ | |
fprintf(stderr, "Memory Allocation Failed\n"); | |
exit(EXIT_FAILURE); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment