My background is Java therefore I'm not used to pointers, the following code throws error and I can't see way:
#include <stdio.h>
#define DIM 2
void sort_intervals(int** intervals, int n);
int main()
{
   int a[3][DIM] = {
         {1, 6} ,
         {4, 9} ,
         {3,17} };
    sort_intervals(a, 3);
  return 0;
}
void sort_intervals(int** intervals, int n)
{
  printf("%d ", intervals[0][0]);//<--- error here
}
Error: Access violation reading location
I'm not allowed to change the function signiture
 
     
     
    