To access any element of 2-D array, imagine it as an array of array. So to access jth element in ith row, it would be like selecting jth element from p[i] array. So it would be p[i][j].
Hence, to access any jth column (element) in ith row, simply use: