[prev] 142 [next]

The malloc() function (cont)

Example use of malloc:

[Diagram:Pic/malloc1.png]

Note: because of a[i] == *(a+i) can use cp[i] to refer to i-th element of the dynamic array