How to represent 4D matrix in C code? Is it possible to write code for 4D matrix? Any easy way please share. So, that I can implement 5D matrix too.
Asked
Active
Viewed 38 times
0
-
The search term is [c multidimensional array](https://www.google.de/search?q=c+multidimensional+array). Give it a try! – Axel Kemper Mar 06 '17 at 19:18
-
So, can we write 4D array like A[x][y][z][w] ? – Srestha1 Mar 07 '17 at 07:04
-
and if use this 4D array to a 1D array, Can we write like A[0][0][0][1] or A[1][0][0][0] ? – Srestha1 Mar 07 '17 at 07:06
-
To access one element of the 4D array, you write `A[x][y][z][w]`. If you are curious how the elements are stored in memory, you can read a [related post](http://stackoverflow.com/questions/2565039/how-are-multi-dimensional-arrays-formatted-in-memory). – Axel Kemper Mar 07 '17 at 08:09