allocate a 2d array in C style