double **tmp;
tmp = (double**)malloc(N * sizeof(double*));
for (i = 0; i < N; i++)
{
tmp[i] = (double*)malloc(N * sizeof(double));
}
for (i = 0; i < N ; i++)
{
for (j = 0; j < N ; j++)
{
printf("%.0lf\n",tmp[i][j]); // I CAN PRINT ALL ELEMENTS
}
}
result = (tmp[0][0] * tmp[1][1]) - (tmp[0][1] * tmp[1][0]);// BUT HERE tmp[1][1] gives weird value;
what is the reason of the problem mentioned in comments? I fill all tmp elements with some values.
Appreciated.