You can't dynamically allocate a 2D array in one step like 'new int[rows][cols]'. Instead you either need to allocate a 1D array with rows*cols elements and do maths to convert a row and col into an index of the 1D array or you need to allocate an array of pointers, where each pointer points to an array holding the data. To hold the array of pointers you need a pointer to a pointer, so you need to make examsptr an int**.
You then need to allocate the arrays that are pointed at by the array of pointers in a loop.