Dynamically allocated multi-dimensional arrays in C

↔️ ↕️


in threes video I want to take a look at

how to dynamically allocate a

multi-dimensional array so we know that

a multi-dimensional array statically

allocated looks something like this you

know all right we have an array that is

of size 3 by 3 and then what's happening

here we have basically a one big array

that holds all the other three small

arrays and each of those arrays are have

free integrals in them there's one

crucial thing to realize in all this

that in this arrange multi-dimensional

array there's no pointers involved right

if I try to print out its size so if I

say let's say print F % ll you backslash

N and have your size of array if I run

this program you'll see I get 36 and 36

is really if we divide by the side of

int which is 4 we're gonna get 9 9

integrals that's exactly how many we

Related queries:

how to malloc array
how to malloc a char array in c
3d array in c example