Answers for "malloc inb c matrix"

C
0

how to malloc for matrix in c

int** mat = (int**)malloc(rows * sizeof(int*))

for (int index=0;index<row;++index)
{
    mat[index] = (int*)malloc(col * sizeof(int));
}
Posted by: Guest on November-27-2020

Code answers related to "C"

Browse Popular Code Answers by Language