Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
size_t i;
int **matrix;
matrix = (int **)calloc(100, sizeof(int *matrix));
if (matrix == NULL) {
   /* handle error */
}

for (i = 0; i < 100; i++) {
   matrix[i] = (int *)calloc(i, sizeof(int*matrix[i]));
   if (matrix[i] == NULL) {
      /* handle error */
   }
}

...